-
Notifications
You must be signed in to change notification settings - Fork 8
Description
If I use a server base URL like GET: https://kpit.jamacloud.com/blafoobar/rest/v1/, the JamaClient.ping() method succeeds, because its actually only checks for errors (ApacheHttpClient:#120). However, in this case a 302 (redirect) is returned and all subsequent calls to the API fail with an exception:
java.lang.NullPointerException at java.io.StringReader.<init>(StringReader.java:50) at org.json.simple.parser.JSONParser.parse(JSONParser.java:79) at org.json.simple.parser.JSONParser.parse(JSONParser.java:75) at com.jamasoftware.services.restclient.json.SimpleJsonUtil.parseObject(SimpleJsonUtil.java:133)
Any idea how to make this more robust? Maybe the ping() evaluates the redirect and saves the redirected base URL? Or the client handles redirect calls on any get/put request (might be expensive).