public class HttpProxyRequest extends ProxyRequest
| Modifier and Type | Field and Description |
|---|---|
String |
httpURI
The HTTP URI.
|
String |
httpVerb
The HTTP verb.
|
| Constructor and Description |
|---|
HttpProxyRequest(InetSocketAddress endpointAddress)
Constructor which creates a HTTP/1.0 CONNECT request to the specified
endpoint.
|
HttpProxyRequest(InetSocketAddress endpointAddress,
String httpVersion)
Constructor which creates a CONNECT request to the specified endpoint
using the provided protocol version.
|
HttpProxyRequest(InetSocketAddress endpointAddress,
String httpVersion,
Map<String,List<String>> headers)
Constructor which creates a CONNECT request to the specified endpoint
using the provided protocol version and setting the requested headers.
|
HttpProxyRequest(String httpURI)
Constructor which creates a HTTP/1.0 GET request to the specified
http URI.
|
HttpProxyRequest(String httpURI,
String httpVersion)
Constructor which creates a GET request to the specified http URI
using the provided protocol version
|
HttpProxyRequest(String httpVerb,
String httpURI,
String httpVersion)
Constructor which creates a request using the provided HTTP verb targeted at
the specified http URI using the provided protocol version.
|
HttpProxyRequest(String httpVerb,
String httpURI,
String httpVersion,
Map<String,List<String>> headers)
Constructor which creates a request using the provided HTTP verb targeted at
the specified http URI using the provided protocol version and setting the
requested headers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkRequiredProperties(String... propNames)
Check if the given property(ies) is(are) set.
|
Map<String,List<String>> |
getHeaders()
Returns the HTTP headers.
|
String |
getHost()
Returns the host to which we are connecting.
|
String |
getHttpURI()
Returns the request HTTP URI.
|
String |
getHttpVerb()
Returns the HTTP request verb.
|
String |
getHttpVersion()
Returns the HTTP version.
|
Map<String,String> |
getProperties()
Returns additional properties for the request.
|
void |
setHeaders(Map<String,List<String>> headers)
Set the HTTP headers.
|
void |
setHttpVersion(String httpVersion)
Sets the HTTP version.
|
void |
setProperties(Map<String,String> properties)
Set additional properties for the request.
|
String |
toHttpString()
Returns the string representation of the HTTP request .
|
getEndpointAddresspublic final String httpVerb
public final String httpURI
public HttpProxyRequest(InetSocketAddress endpointAddress)
endpointAddress - the endpoint to connect topublic HttpProxyRequest(InetSocketAddress endpointAddress, String httpVersion)
endpointAddress - the endpoint to connect tohttpVersion - the HTTP protocol versionpublic HttpProxyRequest(InetSocketAddress endpointAddress, String httpVersion, Map<String,List<String>> headers)
endpointAddress - the endpoint to connect tohttpVersion - the HTTP protocol versionheaders - the additionnal http headerspublic HttpProxyRequest(String httpURI)
httpURI - the target URIpublic HttpProxyRequest(String httpURI, String httpVersion)
httpURI - the target URIhttpVersion - the HTTP protocol versionpublic HttpProxyRequest(String httpVerb, String httpURI, String httpVersion)
httpVerb - the HTTP verb to usehttpURI - the target URIhttpVersion - the HTTP protocol versionpublic HttpProxyRequest(String httpVerb, String httpURI, String httpVersion, Map<String,List<String>> headers)
httpVerb - the HTTP verb to usehttpURI - the target URIhttpVersion - the HTTP protocol versionheaders - the additional http headerspublic final String getHttpVerb()
public String getHttpVersion()
public void setHttpVersion(String httpVersion)
httpVersion - the HTTP protocol versionpublic final String getHost()
public final String getHttpURI()
public Map<String,String> getProperties()
public void setProperties(Map<String,String> properties)
public void checkRequiredProperties(String... propNames) throws ProxyAuthException
ProxyAuthException.ProxyAuthExceptionpublic String toHttpString()