public class HttpClientRequestImpl extends HttpRequestImpl implements HttpClientRequest
UrlAccessor.UrlBuilder<URL extends Url,B extends UrlAccessor.UrlBuilder<URL,B>>, UrlAccessor.UrlMutator<URL extends Url>, UrlAccessor.UrlProperty<URL extends Url>HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodPropertyHeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>| Modifier and Type | Field and Description |
|---|---|
protected MediaTypeFactoryLookup |
_mediaTypeFactoryLookup |
_headerFields, _httpMethod, _url| Constructor and Description |
|---|
HttpClientRequestImpl(HttpMethod aHttpMethod,
Url aUrl,
MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Instantiates a new http client request impl.
|
HttpClientRequestImpl(HttpMethod aHttpMethod,
Url aUrl,
Object aRequest,
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 and 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(). |
getHeaderFields, getHttpMethod, getUrlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithRequestgetUrlgetHttpMethodgetHeaderFieldsprotected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the a http methodaUrl - The Url from which to take the URL specific data.aMediaTypeFactoryLookup - the a media type factory lookuppublic HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, Object aRequest, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the a http methodaUrl - The Url from which to take the URL specific data.aRequest - the a requestaMediaTypeFactoryLookup - the a media type factory lookuppublic HttpClientRequestImpl(HttpMethod aHttpMethod, Url aUrl, RequestHeaderFields aHeaderFields, Object aRequest, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpMethod - the a http methodaUrl - The Url from which to take the URL specific data.aHeaderFields - the a Header-FieldsaRequest - the a requestaMediaTypeFactoryLookup - the a 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.