class HttpClientImpl implements OktaHttpClient {

    @Override
    public InputStream connect(@NonNull Uri uri, @NonNull ConnectionParameters params)
            throws Exception {

        mUrlConnection = openConnection(new URL(uri.toString()), params);
        mUrlConnection.connect();
        try {
            return mUrlConnection.getInputStream();
        } catch (IOException e) {
            return mUrlConnection.getErrorStream();
        }
    }

}