railo.commons.net.http.httpclient4
Class HTTPEngine4Impl

java.lang.Object
  extended by railo.commons.net.http.httpclient4.HTTPEngine4Impl

public class HTTPEngine4Impl
extends Object


Constructor Summary
HTTPEngine4Impl()
           
 
Method Summary
static void addCookie(org.apache.http.impl.client.DefaultHttpClient client, String domain, String name, String value, String path, String charset)
           
static org.apache.http.impl.client.DefaultHttpClient createClient(org.apache.http.params.BasicHttpParams params, int maxRedirect)
           
static HTTPResponse delete(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
          does a http delete request
static HTTPResponse get(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
          does a http get request
static Entity getByteArrayEntity(byte[] barr, String contentType)
           
static Entity getEmptyEntity(String contentType)
           
static Entity getResourceEntity(Resource res, String contentType)
           
static Entity getTemporaryStreamEntity(TemporaryStream ts, String contentType)
           
static HTTPResponse head(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
          does a http head request
static Header header(String name, String value)
           
static HTTPResponse post(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
          does a http post request
static HTTPResponse put(URL url, String username, String password, long timeout, int maxRedirect, String mimetype, String charset, String useragent, ProxyData proxy, Header[] headers, Object body)
          does a http put request
static void setBody(org.apache.http.HttpEntityEnclosingRequest req, Object body, String mimetype, String charset)
           
static org.apache.http.protocol.BasicHttpContext setCredentials(org.apache.http.impl.client.DefaultHttpClient client, org.apache.http.HttpHost httpHost, String username, String password, boolean preAuth)
           
static void setNTCredentials(org.apache.http.impl.client.DefaultHttpClient client, String username, String password, String workStation, String domain)
           
static void setProxy(org.apache.http.impl.client.DefaultHttpClient client, org.apache.http.client.methods.HttpUriRequest request, ProxyData proxy)
           
static void setTimeout(org.apache.http.params.HttpParams params, long timeout)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPEngine4Impl

public HTTPEngine4Impl()
Method Detail

get

public static HTTPResponse get(URL url,
                               String username,
                               String password,
                               long timeout,
                               int maxRedirect,
                               String charset,
                               String useragent,
                               ProxyData proxy,
                               Header[] headers)
                        throws IOException
does a http get request

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
headers -
Returns:
Throws:
IOException

post

public static HTTPResponse post(URL url,
                                String username,
                                String password,
                                long timeout,
                                int maxRedirect,
                                String charset,
                                String useragent,
                                ProxyData proxy,
                                Header[] headers)
                         throws IOException
does a http post request

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
headers -
Returns:
Throws:
IOException

put

public static HTTPResponse put(URL url,
                               String username,
                               String password,
                               long timeout,
                               int maxRedirect,
                               String mimetype,
                               String charset,
                               String useragent,
                               ProxyData proxy,
                               Header[] headers,
                               Object body)
                        throws IOException
does a http put request

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
headers -
body -
Returns:
Throws:
IOException
PageException

delete

public static HTTPResponse delete(URL url,
                                  String username,
                                  String password,
                                  long timeout,
                                  int maxRedirect,
                                  String charset,
                                  String useragent,
                                  ProxyData proxy,
                                  Header[] headers)
                           throws IOException
does a http delete request

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
headers -
Returns:
Throws:
IOException

head

public static HTTPResponse head(URL url,
                                String username,
                                String password,
                                long timeout,
                                int maxRedirect,
                                String charset,
                                String useragent,
                                ProxyData proxy,
                                Header[] headers)
                         throws IOException
does a http head request

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
headers -
Returns:
Throws:
IOException

header

public static Header header(String name,
                            String value)

createClient

public static org.apache.http.impl.client.DefaultHttpClient createClient(org.apache.http.params.BasicHttpParams params,
                                                                         int maxRedirect)

setTimeout

public static void setTimeout(org.apache.http.params.HttpParams params,
                              long timeout)

setCredentials

public static org.apache.http.protocol.BasicHttpContext setCredentials(org.apache.http.impl.client.DefaultHttpClient client,
                                                                       org.apache.http.HttpHost httpHost,
                                                                       String username,
                                                                       String password,
                                                                       boolean preAuth)

setNTCredentials

public static void setNTCredentials(org.apache.http.impl.client.DefaultHttpClient client,
                                    String username,
                                    String password,
                                    String workStation,
                                    String domain)

setBody

public static void setBody(org.apache.http.HttpEntityEnclosingRequest req,
                           Object body,
                           String mimetype,
                           String charset)
                    throws IOException
Throws:
IOException

setProxy

public static void setProxy(org.apache.http.impl.client.DefaultHttpClient client,
                            org.apache.http.client.methods.HttpUriRequest request,
                            ProxyData proxy)

addCookie

public static void addCookie(org.apache.http.impl.client.DefaultHttpClient client,
                             String domain,
                             String name,
                             String value,
                             String path,
                             String charset)

getEmptyEntity

public static Entity getEmptyEntity(String contentType)

getByteArrayEntity

public static Entity getByteArrayEntity(byte[] barr,
                                        String contentType)

getTemporaryStreamEntity

public static Entity getTemporaryStreamEntity(TemporaryStream ts,
                                              String contentType)

getResourceEntity

public static Entity getResourceEntity(Resource res,
                                       String contentType)


Copyright © 2012 Railo