public class HTTPEngine4Impl extends Object
Constructor and Description |
---|
HTTPEngine4Impl() |
Modifier and Type | Method and Description |
---|---|
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 org.apache.http.HttpResponse |
execute(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest req,
org.apache.http.protocol.HttpContext context) |
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 |
post(URL url,
String username,
String password,
long timeout,
int maxRedirect,
String charset,
String useragent,
ProxyData proxy,
Header[] headers,
Map<String,String> formfields) |
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,
TimeSpan timeout)
sets the timeout for the connection and socket (same value)
|
public HTTPEngine4Impl()
public static HTTPResponse get(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- in mscharset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse post(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- in mscharset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse post(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers, Map<String,String> formfields) throws IOException
IOException
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
url
- username
- password
- timeout
- in mscharset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- body
- IOException
PageException
public static HTTPResponse delete(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- in mscharset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse head(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- in mscharset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static org.apache.http.impl.client.DefaultHttpClient createClient(org.apache.http.params.BasicHttpParams params, int maxRedirect)
public static void setTimeout(org.apache.http.params.HttpParams params, TimeSpan timeout)
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)
public static void setNTCredentials(org.apache.http.impl.client.DefaultHttpClient client, String username, String password, String workStation, String domain)
public static void setBody(org.apache.http.HttpEntityEnclosingRequest req, Object body, String mimetype, String charset) throws IOException
IOException
public static void setProxy(org.apache.http.impl.client.DefaultHttpClient client, org.apache.http.client.methods.HttpUriRequest request, ProxyData proxy)
public static void addCookie(org.apache.http.impl.client.DefaultHttpClient client, String domain, String name, String value, String path, String charset)
public static Entity getEmptyEntity(String contentType)
public static Entity getByteArrayEntity(byte[] barr, String contentType)
public static Entity getTemporaryStreamEntity(TemporaryStream ts, String contentType)
public static Entity getResourceEntity(Resource res, String contentType)
public static org.apache.http.HttpResponse execute(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest req, org.apache.http.protocol.HttpContext context) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolException
IOException
Copyright © 2015 Lucee