public class HTTPEngineImpl extends Object
Constructor and Description |
---|
HTTPEngineImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
addCookie(org.apache.http.client.CookieStore cookieStore,
String domain,
String name,
String value,
String path,
String charset) |
static HTTPResponse |
delete(URL url,
String username,
String password,
long timeout,
boolean redirect,
String charset,
String useragent,
ProxyData proxy,
Header[] headers)
does a http delete request
|
static HTTPResponse |
get(URL url,
String username,
String password,
long timeout,
boolean redirect,
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,
boolean redirect,
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,
boolean redirect,
String charset,
String useragent,
ProxyData proxy,
Header[] headers)
does a http post request
|
static HTTPResponse |
post(URL url,
String username,
String password,
long timeout,
boolean redirect,
String charset,
String useragent,
ProxyData proxy,
Header[] headers,
Map<String,String> formfields) |
static HTTPResponse |
put(URL url,
String username,
String password,
long timeout,
boolean redirect,
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.HttpClientBuilder builder,
org.apache.http.HttpHost httpHost,
String username,
String password,
boolean preAuth) |
static void |
setNTCredentials(org.apache.http.impl.client.HttpClientBuilder builder,
String username,
String password,
String workStation,
String domain) |
static void |
setProxy(org.apache.http.impl.client.HttpClientBuilder builder,
org.apache.http.client.methods.HttpUriRequest request,
ProxyData proxy) |
public HTTPEngineImpl()
public static HTTPResponse get(URL url, String username, String password, long timeout, boolean redirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse post(URL url, String username, String password, long timeout, boolean redirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse post(URL url, String username, String password, long timeout, boolean redirect, 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, boolean redirect, String mimetype, String charset, String useragent, ProxyData proxy, Header[] headers, Object body) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- body
- IOException
PageException
public static HTTPResponse delete(URL url, String username, String password, long timeout, boolean redirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static HTTPResponse head(URL url, String username, String password, long timeout, boolean redirect, String charset, String useragent, ProxyData proxy, Header[] headers) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
- headers
- IOException
public static org.apache.http.protocol.BasicHttpContext setCredentials(org.apache.http.impl.client.HttpClientBuilder builder, org.apache.http.HttpHost httpHost, String username, String password, boolean preAuth)
public static void setNTCredentials(org.apache.http.impl.client.HttpClientBuilder builder, 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.HttpClientBuilder builder, org.apache.http.client.methods.HttpUriRequest request, ProxyData proxy)
public static void addCookie(org.apache.http.client.CookieStore cookieStore, 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)
Copyright © 2015 Lucee