public static String send(UsernamePasswordCredentials upc,
                              InputStream keystore, char[] password,
                              HttpHost targetHost, String uri, HttpHost proxyHost,
                              String encoding, RequestMethod method, Header... headers) throws IOException {

        if (!uri.startsWith("/")) {
            uri = "/" + uri;
        }
        HttpRequest hm = getHttpMethod(method, uri);
        if (headers != null && headers.length > 0) {
            hm.setHeaders(headers);
        }
        log.debug("url: {} method: {}", getURL(targetHost, uri), method);

        return execute(targetHost, proxyHost, hm, encoding, upc,
                keystore, password);
    }
public static String send(UsernamePasswordCredentials upc,
                              InputStream keystore, char[] password,
                              HttpHost targetHost, String uri, HttpHost proxyHost,
                              String encoding, RequestMethod method, Header... headers) throws IOException {

        if (!uri.startsWith("/")) {
            uri = "/" + uri;
        }
        HttpRequest hm = getHttpMethod(method, uri);
        if (headers != null && headers.length > 0) {
            hm.setHeaders(headers);
        }
        log.debug("url: {} method: {}", getURL(targetHost, uri), method);

        return execute(targetHost, proxyHost, hm, encoding, upc,
                keystore, password);
    }
public static String send ( UsernamePasswordCredentials upc , InputStream keystore , char [ ] password , HttpHost targetHost , String uri , HttpHost proxyHost , String encoding , RequestMethod method , Header ... headers ) throws IOException { if ( ! uri . startsWith ( "/" ) ) { uri = "/" + uri ; } HttpRequest hm = getHttpMethod ( method , uri ) ; if ( headers != null && headers . length > 0 ) { hm . setHeaders ( headers ) ; } log . debug ( "url: {} method: {}" , getURL ( targetHost , uri ) , method ) ; return execute ( targetHost , proxyHost , hm , encoding , upc , keystore , password ) ; }
Send a http request with explicit params

@param upc        basic auth {@link UsernamePasswordCredentials}
@param keystore   keyStore InputStream (Custom SSL)
@param password   keyStore password
@param targetHost HttpHost
@param uri        URI
@param proxyHost  HttpHost
@param encoding   (default UTF-8)
@param method     {@link com.rockagen.commons.http.RequestMethod}
@param headers headers    (optional)
@return result String
@throws IOException  if an I/O error occurs
Send a http request with explicit params