public class HttpClientWebRequest extends HttpWebRequest
Constructor and Description |
---|
HttpClientWebRequest(org.apache.http.impl.client.CloseableHttpClient httpClient,
org.apache.http.client.protocol.HttpClientContext httpContext)
Instantiates a new http native web request.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the connection by Closing.
|
int |
executeRequest()
Executes Request by sending request xml data to server.
|
String |
getContentEncoding()
Gets the content encoding.
|
InputStream |
getErrorStream()
Gets the error stream.
|
InputStream |
getInputStream()
Gets the input stream.
|
OutputStream |
getOutputStream()
Gets the output stream.
|
Map<String,String> |
getRequestProperty()
Gets the request property.
|
int |
getResponseCode()
Gets the response code.
|
String |
getResponseContentType()
Gets the response content type.
|
String |
getResponseHeaderField(String headerName)
Gets the response header field.
|
Map<String,String> |
getResponseHeaders()
Gets the response headers.
|
String |
getResponseText()
Gets the response message.
|
void |
prepareConnection()
Prepares the request by setting appropriate headers, authentication, timeouts, etc.
|
getAccept, getContentType, getDomain, getHeaders, getPassword, getProxy, getRequestMethod, getTimeout, getUrl, getUserAgent, getUsername, isAcceptGzipEncoding, isAllowAuthentication, isAllowAutoRedirect, isHttpScheme, isHttpsScheme, isKeepAlive, isPreAuthenticate, isUseDefaultCredentials, setAccept, setAcceptGzipEncoding, setAllowAuthentication, setAllowAutoRedirect, setContentType, setCredentials, setDomain, setHeaders, setKeepAlive, setPassword, setPreAuthenticate, setProxy, setRequestMethod, setTimeout, setUrl, setUseDefaultCredentials, setUserAgent, setUsername
public HttpClientWebRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.protocol.HttpClientContext httpContext)
public void close() throws IOException
close
in class HttpWebRequest
IOException
public void prepareConnection()
prepareConnection
in class HttpWebRequest
public InputStream getInputStream() throws EWSHttpException, IOException
getInputStream
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionIOException
- the IO exceptionpublic InputStream getErrorStream() throws EWSHttpException
getErrorStream
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic OutputStream getOutputStream() throws EWSHttpException
getOutputStream
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic Map<String,String> getResponseHeaders() throws EWSHttpException
getResponseHeaders
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic String getResponseHeaderField(String headerName) throws EWSHttpException
HttpWebRequest
getResponseHeaderField
in class HttpWebRequest
headerName
- the header nameEWSHttpException
- the EWS http exceptionpublic String getContentEncoding() throws EWSHttpException
getContentEncoding
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic String getResponseContentType() throws EWSHttpException
getResponseContentType
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic int executeRequest() throws EWSHttpException, IOException
executeRequest
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionIOException
- the IO Exceptionpublic int getResponseCode() throws EWSHttpException
getResponseCode
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic String getResponseText() throws EWSHttpException
getResponseText
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionpublic Map<String,String> getRequestProperty() throws EWSHttpException
getRequestProperty
in class HttpWebRequest
EWSHttpException
- the EWS http exceptionCopyright © 2012–2015 Microsoft. All rights reserved.