Package 

Class HttpService


  • 
    public class HttpService
    
                        

    HttpService provides the basic tools to construct URLs properly, and issue HTTP requests, especially those that yield a JSON response.

    • Constructor Detail

      • HttpService

        HttpService()
        HttpServiceWhen using the default constructor, DEFAULT_CONNECT_TIMEOUT and DEFAULT_READ_TIMEOUT areused for the timeout values.
      • HttpService

        HttpService(int connectTimeout, int readTimeout)
        HttpServiceProvides overrides for the connection and read timeout values on instantiation.Please note:Setting override values to less than the DEFAULT_CONNECT_TIMEOUT and DEFAULT_READ_TIMEOUT values can result in unexpected request timeouts.Setting override values to less than 1 will force the use of DEFAULT_CONNECT_TIMEOUT and DEFAULT_READ_TIMEOUT as timeout values.
        Parameters:
        connectTimeout - The connection timeout for the underlying HttpURLConnection, in milliseconds.
        readTimeout - The read timeout for the underlying HttpURLConnection, in milliseconds.