Class RestClient

    • Field Detail

      • DEFAULT_HTTP_CONNECT_TIMEOUT

        public static final int DEFAULT_HTTP_CONNECT_TIMEOUT
        See Also:
        Constant Field Values
      • DEFAULT_HTTP_READ_TIMEOUT

        public static int DEFAULT_HTTP_READ_TIMEOUT
    • Method Detail

      • initializeConnection

        public static void initializeConnection​(java.lang.Integer readTimeout,
                                                java.lang.Integer connectTimeout)
        override the connection properties globally
      • setSSLSocketFactory

        public static void setSSLSocketFactory​(javax.net.ssl.SSLSocketFactory sFactory)
        Deprecated.
        SSLSocketFactory does not expose its X509TrustManager, which is a field that OkHttp needs to build a clean certificate chain. This method instead must use reflection to extract the trust manager. Applications should prefer to call #setSSLSocketFactory(SSLSocketFactory, TrustManager[]), which avoids such reflection.
        Set the SSLSocketFactory globally which applies to all connection.
      • setSSLSocketFactory

        public static void setSSLSocketFactory​(javax.net.ssl.SSLSocketFactory sFactory,
                                               java.util.List<javax.net.ssl.TrustManager> trustManagers)
                                        throws MSTRRestAPIException
        Set the SSLSocketFactory globally which applies to all connection.
        Parameters:
        sFactory - SSLSocketFactory to use
        tms - A list of TrustManager, the X509TrustManager inside will be retrieved. If this field is null, a system default X509TrustManager will be created automatically.
        Throws:
        MSTRRestAPIException
      • getResponseWrapper

        public SimpleResponseWrapper getResponseWrapper()
        Get the response object
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object