|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface HttpRequestFactory
Factory that prepares Apache HTTP client related objects for the RestClient.
The interface has been defined to be able to modify details of the HTTP requests created by the
RestClient for special use cases. Usually the default implementation provided
by this bundle is completely sufficient, so a standard user does not need to care about these things.
| Field Summary | |
|---|---|
static java.nio.charset.Charset |
CHARSET
Default charset for char-to-byte conversion. |
static java.lang.String |
CONTENTTYPE_JSON
Content-Type header value for JSON with UTF-8 charset. |
static java.lang.String |
ENCODING
Default encoding for char-to-byte conversion. |
static java.lang.String |
MIMETYPE_JSON
MIME type of JSON. |
| Method Summary | |
|---|---|
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. |
| Field Detail |
|---|
static final java.lang.String MIMETYPE_JSON
static final java.lang.String ENCODING
static final java.lang.String CONTENTTYPE_JSON
static final java.nio.charset.Charset CHARSET
| Method Detail |
|---|
HttpUriRequest getHttpMethod(HttpMethod method,
java.lang.String url)
HttpUriRequest getHttpMethod(HttpMethod method,
java.lang.String url,
HttpParams methodParams)
HttpEntity createJsonEntity(Any parameters)
throws java.io.IOException
HttpEntity.
java.io.IOException
HttpEntity createJsonEntity(java.io.InputStream inputStream)
throws java.io.IOException
HttpEntity.
java.io.IOException
HttpEntity createEntity(java.io.InputStream inputStream,
java.lang.String contentType)
throws java.io.IOException
HttpEntity.
java.io.IOException
HttpEntity createHttpEntity(Any parameters,
Attachments attachments)
throws java.io.IOException
java.io.IOException
HttpEntity createMultipartEntity(Any parameters,
Attachments attachments)
throws java.io.IOException
java.io.IOException
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||