public class DefaultHttpRequestFactory extends java.lang.Object implements HttpRequestFactory
CHARSET, CONTENTTYPE_JSON, ENCODING, MIMETYPE_JSON| Constructor and Description |
|---|
DefaultHttpRequestFactory() |
| Modifier and Type | Method and Description |
|---|---|
HttpEntity |
createEntity(java.io.InputStream inputStream,
java.lang.String contentType)
Wrap an input stream with any content type as an
HttpEntity. |
HttpEntity |
createHttpEntity(Any parameters,
Attachments attachments)
Create an HTTP entity from the input data.
|
HttpEntity |
createJsonEntity(Any parameters)
Write parameters to JSON and wrap as an
HttpEntity. |
HttpEntity |
createJsonEntity(java.io.InputStream inputStream)
Wrap an UTF-8-JSON input stream as an
HttpEntity. |
HttpEntity |
createMultipartEntity(Any parameters,
Attachments attachments)
Create a multipart entity for a JSON metadata body and attachments.
|
HttpUriRequest |
getHttpMethod(HttpMethod method,
java.lang.String url)
Create request object for method and url.
|
HttpUriRequest |
getHttpMethod(HttpMethod method,
java.lang.String url,
HttpParams methodParams)
Create request object for method and URL and set optional parameters.
|
public HttpUriRequest getHttpMethod(HttpMethod method, java.lang.String url)
HttpRequestFactorygetHttpMethod in interface HttpRequestFactorypublic HttpUriRequest getHttpMethod(HttpMethod method, java.lang.String url, HttpParams methodParams)
HttpRequestFactorygetHttpMethod in interface HttpRequestFactorypublic HttpEntity createJsonEntity(Any parameters) throws java.io.IOException
HttpRequestFactoryHttpEntity.createJsonEntity in interface HttpRequestFactoryjava.io.IOExceptionpublic HttpEntity createJsonEntity(java.io.InputStream inputStream)
throws java.io.IOException
HttpRequestFactoryHttpEntity.createJsonEntity in interface HttpRequestFactoryjava.io.IOExceptionpublic HttpEntity createEntity(java.io.InputStream inputStream,
java.lang.String contentType)
throws java.io.IOException
HttpRequestFactoryHttpEntity.createEntity in interface HttpRequestFactoryjava.io.IOExceptionpublic HttpEntity createHttpEntity(Any parameters, Attachments attachments) throws java.io.IOException
HttpRequestFactorycreateHttpEntity in interface HttpRequestFactoryjava.io.IOExceptionpublic HttpEntity createMultipartEntity(Any parameters, Attachments attachments) throws java.io.IOException
HttpRequestFactorycreateMultipartEntity in interface HttpRequestFactoryjava.io.IOException