Now it parses to right error representation. Also fix that right
exception for error is not thrown on api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
By default OkHttpClient will not allow self-signed certificates, but
some of app users use them.
This is disabled by default, should be enabled explicitly.
It also allows any CN in self-signed certificate.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
Add a api wrapper that checks if current protocol version is supported
for this call and fail fast if not.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
As this call should return byte stream: I've introduced helper method
in client to do the actual call and parse possible json error response.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>