co.cask.common.http
Class HttpRequests

java.lang.Object
  extended by co.cask.common.http.HttpRequests

public final class HttpRequests
extends Object

Executes HttpRequests and returns an HttpResponse.


Method Summary
static void disableCertCheck(HttpsURLConnection conn)
           
static HttpResponse execute(HttpRequest request)
          Executes an HTTP request with default request configuration.
static HttpResponse execute(HttpRequest request, HttpRequestConfig requestConfig)
          Executes an HTTP request to the url provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

execute

public static HttpResponse execute(HttpRequest request,
                                   HttpRequestConfig requestConfig)
                            throws IOException
Executes an HTTP request to the url provided.

Parameters:
request - HTTP request to execute
requestConfig - configuration for the HTTP request to execute
Returns:
HTTP response
Throws:
IOException

execute

public static HttpResponse execute(HttpRequest request)
                            throws IOException
Executes an HTTP request with default request configuration.

Parameters:
request - HTTP request to execute
Returns:
HTTP response
Throws:
IOException

disableCertCheck

public static void disableCertCheck(HttpsURLConnection conn)
                             throws NoSuchAlgorithmException,
                                    KeyManagementException
Throws:
NoSuchAlgorithmException
KeyManagementException


Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.