Class HttpClientUtils


  • public class HttpClientUtils
    extends Object
    Provides Apache HttpClient utility methods.
    • Constructor Detail

      • HttpClientUtils

        public HttpClientUtils()
    • Method Detail

      • invokePost

        public static void invokePost​(String url,
                                      Map<String,​String> params,
                                      int timeout)
        Invoke the given URL using HTTP POST
        Parameters:
        url - the URL to invoke
        params - the POST parameters
        timeout - the timeout in milliseconds
      • close

        public static void close​(org.apache.http.client.methods.HttpRequestBase request,
                                 org.apache.http.HttpResponse response)
        Close the HttpClient GET request silently
        Parameters:
        request - the HttpGet request
        response - the HttpResponse object