HeaderFieldsAccessor<RequestHeaderFields>, HttpBodyAccessor.HttpBodyProvider<BadRequestException>, HttpClientRequest, HttpMethodAccessor, HttpRequest, UrlAccessorpublic class HttpClientRequestImpl extends HttpRequestImpl implements HttpClientRequest
HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodPropertyUrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty| Modifier and Type | Field | Description |
|---|---|---|
protected MediaTypeFactoryLookup |
_mediaTypeFactoryLookup |
_headerFields, _httpMethod, _url| Constructor | Description |
|---|---|
HttpClientRequestImpl(HttpMethod aHttpMethod,
Url aUrl,
Object aRequest,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
Instantiates a new http client request impl.
|
HttpClientRequestImpl(HttpMethod aHttpMethod,
Url aUrl,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
Instantiates a new http client request impl.
|
HttpClientRequestImpl(HttpMethod aHttpMethod,
Url aUrl,
RequestHeaderFields aHeaderFields,
Object aRequest,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
Instantiates a new http client request impl.
|
| Modifier and Type | Method | Description |
|---|---|---|
<REQ> REQ |
getRequest() |
Gets the request.
|
<REQ> void |
setRequest(REQ aRequest) |
Sets the request for the request property.
|
String |
toHttpBody() |
Automatically sets the
ContentType to the
RequestHeaderFields retrieved from HeaderFieldsAccessor.getHeaderFields(). |
getHeaderFieldswithRequestgetHttpMethodgetHeaderFields, getHttpMethod, getUrlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUrlprotected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the http methodaUrl - The Url from which to take the URL specific data.aMediaTypeFactoryLookup - the media type factory lookuppublic HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, Object aRequest, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the http methodaUrl - The Url from which to take the URL specific data.aRequest - the requestaMediaTypeFactoryLookup - the media type factory lookuppublic HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields, Object aRequest, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the http methodaUrl - The Url from which to take the URL specific data.aHeaderFields - the Header-FieldsaRequest - the requestaMediaTypeFactoryLookup - the media type factory lookuppublic <REQ> REQ getRequest()
getRequest in interface HttpClientRequestREQ - the generic typepublic <REQ> void setRequest(REQ aRequest)
setRequest(Object) supports the
HttpBodyMap to marshal an HttpBodyMap into an HTTP
Request-Body.setRequest in interface HttpClientRequestREQ - the generic typeaRequest - The request to be stored by the request property.public String toHttpBody() throws BadRequestException
ContentType to the
RequestHeaderFields retrieved from HeaderFieldsAccessor.getHeaderFields().
(see
HeaderFields.putContentType(org.refcodes.net.HttpMediaType)
)
Converts an object representing the HTTP body to a String
instance. Automatically determines the ContentType from any
headers when applicable.toHttpBody in interface HttpBodyAccessor.HttpBodyProvider<BadRequestException>toHttpBody in interface HttpClientRequestString instance represented by the
according object.BadRequestExceptionCopyright © 2018. All rights reserved.