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>
Default Okhttp read timeout is 10 sec, and as subsonic servers may be
not fast, better to increase timeout.
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>