On the android platform I see several issues:
1) It will throw javax.net.ssl.SSLPeerUnverifiedException: Hostname not verified when using an intermediate certificate. Workaround is to disable validatesDomainName.
2) It will try to convert the response into a json no matter what it is. This makes it impossible to determine if the request failed because of a 500, a 404 or a 403.
3) It should not try to convert the response into json even if its a 200, just like in ios. If you can't provide a "getJSON" method its best to let the developer parse the response how he needs it. Just give: { content: "raw content", statusCode: statusCode, headers: headers }
On the android platform I see several issues: 1) It will throw javax.net.ssl.SSLPeerUnverifiedException: Hostname not verified when using an intermediate certificate. Workaround is to disable validatesDomainName. 2) It will try to convert the response into a json no matter what it is. This makes it impossible to determine if the request failed because of a 500, a 404 or a 403. 3) It should not try to convert the response into json even if its a 200, just like in ios. If you can't provide a "getJSON" method its best to let the developer parse the response how he needs it. Just give: { content: "raw content", statusCode: statusCode, headers: headers }