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)
HttpRequestFactory
getHttpMethod
in interface HttpRequestFactory
public HttpUriRequest getHttpMethod(HttpMethod method, java.lang.String url, HttpParams methodParams)
HttpRequestFactory
getHttpMethod
in interface HttpRequestFactory
public HttpEntity createJsonEntity(Any parameters) throws java.io.IOException
HttpRequestFactory
HttpEntity
.createJsonEntity
in interface HttpRequestFactory
java.io.IOException
public HttpEntity createJsonEntity(java.io.InputStream inputStream) throws java.io.IOException
HttpRequestFactory
HttpEntity
.createJsonEntity
in interface HttpRequestFactory
java.io.IOException
public HttpEntity createEntity(java.io.InputStream inputStream, java.lang.String contentType) throws java.io.IOException
HttpRequestFactory
HttpEntity
.createEntity
in interface HttpRequestFactory
java.io.IOException
public HttpEntity createHttpEntity(Any parameters, Attachments attachments) throws java.io.IOException
HttpRequestFactory
createHttpEntity
in interface HttpRequestFactory
java.io.IOException
public HttpEntity createMultipartEntity(Any parameters, Attachments attachments) throws java.io.IOException
HttpRequestFactory
createMultipartEntity
in interface HttpRequestFactory
java.io.IOException