public class HttpClientRequestImpl extends HttpRequestImpl implements HttpClientRequest
org.refcodes.mixin.LocatorAccessor.LocatorBuilder<T,B extends org.refcodes.mixin.LocatorAccessor.LocatorBuilder<T,B>>, org.refcodes.mixin.LocatorAccessor.LocatorMutator<T>, org.refcodes.mixin.LocatorAccessor.LocatorProperty<T>QueryFieldsAccessor.QueryFieldsBuilder<B extends QueryFieldsAccessor.QueryFieldsBuilder<?>>, QueryFieldsAccessor.QueryFieldsMutator, QueryFieldsAccessor.QueryFieldsPropertyHttpMethodAccessor.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 |
_httpMethod, _locator, _queryFields, _requestHeaderFields| Constructor and Description |
|---|
HttpClientRequestImpl(HttpMethod aHttpMethod,
String aLocator,
FormFields aQueryFields,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
HttpClientRequestImpl(HttpMethod aHttpMethod,
String aLocator,
FormFields aQueryFields,
Object aRequestBody,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
| Modifier and Type | Method and Description |
|---|---|
<REQ> REQ |
getRequest()
Retrieves the request from the request property.
|
<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, getLocator, getQueryFieldsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithRequestgetQueryFieldsgetHttpMethodgetHeaderFieldsprotected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpClientRequestImpl(HttpMethod aHttpMethod, String aLocator, FormFields aQueryFields, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
public HttpClientRequestImpl(HttpMethod aHttpMethod, String aLocator, FormFields aQueryFields, Object aRequestBody, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
public <REQ> REQ getRequest()
HttpClientRequestgetRequest in interface HttpClientRequestpublic <REQ> void setRequest(REQ aRequest)
HttpClientRequestsetRequest in interface HttpClientRequestaRequest - The request to be stored by the request property.public String toHttpBody() throws BadRequestException
HttpClientRequestContentType to the
RequestHeaderFields retrieved from HeaderFieldsAccessor.getHeaderFields().
(see
HeaderFields.putContentType(org.refcodes.net.HttpMediaType)
)
Returns the String instance representing the HTTP body from
the implementing instance.
Automatically sets the ContentType to any headers if
accessible and applicable.toHttpBody in interface HttpBodyAccessor.HttpBodyProvider<BadRequestException>toHttpBody in interface HttpClientRequestString instance represented by the
implementing instance.BadRequestExceptionCopyright © 2017. All rights reserved.