https
https copied to clipboard
The android side is not working as expected.
On the android platform I see several issues:
- It will throw javax.net.ssl.SSLPeerUnverifiedException: Hostname not verified when using an intermediate certificate. Workaround is to disable validatesDomainName.
- 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.
- 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 }
In the current state the plugin is only meant to work with basic APIs. I'll have to publish a new update soon as I've improved this over time.