@NotThreadSafe public class ApacheHttpConnection extends java.lang.Object implements HttpConnection
| Constructor and Description |
|---|
ApacheHttpConnection(java.net.URI uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(HttpRequestBody body,
HttpCredentials cred) |
void |
disconnect() |
HeaderSet |
getResponseHeaders() |
java.lang.String |
getResponseMessage() |
int |
getResponseStatus() |
java.io.InputStream |
getResponseStream()
TODO: How to use Apache HTTP Client facilities for response content
handling, instead of parsing this stream myself?
|
void |
setChunked(boolean chunked) |
void |
setFollowRedirect(boolean follow) |
void |
setGzip(boolean gzip) |
void |
setHttpVersion(java.lang.String ver) |
void |
setPreemptiveAuthentication(boolean preemptiveAuthentication) |
void |
setRequestHeaders(HeaderSet headers) |
void |
setRequestMethod(java.lang.String method,
boolean with_content) |
void |
setTimeout(int seconds) |
public void connect(HttpRequestBody body, HttpCredentials cred) throws HttpClientException
connect in interface HttpConnectionHttpClientExceptionpublic void disconnect()
throws HttpClientException
disconnect in interface HttpConnectionHttpClientExceptionpublic void setHttpVersion(java.lang.String ver)
throws HttpClientException
setHttpVersion in interface HttpConnectionHttpClientExceptionpublic void setRequestHeaders(HeaderSet headers) throws HttpClientException
setRequestHeaders in interface HttpConnectionHttpClientExceptionpublic void setRequestMethod(java.lang.String method,
boolean with_content)
throws HttpClientException
setRequestMethod in interface HttpConnectionHttpClientExceptionpublic void setFollowRedirect(boolean follow)
setFollowRedirect in interface HttpConnectionpublic void setTimeout(int seconds)
setTimeout in interface HttpConnectionpublic void setGzip(boolean gzip)
setGzip in interface HttpConnectionpublic void setChunked(boolean chunked)
setChunked in interface HttpConnectionpublic void setPreemptiveAuthentication(boolean preemptiveAuthentication)
setPreemptiveAuthentication in interface HttpConnectionpublic int getResponseStatus()
getResponseStatus in interface HttpConnectionpublic java.lang.String getResponseMessage()
getResponseMessage in interface HttpConnectionpublic HeaderSet getResponseHeaders() throws HttpClientException
getResponseHeaders in interface HttpConnectionHttpClientExceptionpublic java.io.InputStream getResponseStream()
throws HttpClientException
getResponseStream in interface HttpConnectionHttpClientExceptionCopyright © 2015-2020 EXPath. All Rights Reserved