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.QueryFieldsProperty
HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodProperty
HeaderFieldsAccessor.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, getQueryFields
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withRequest
getQueryFields
getHttpMethod
getHeaderFields
protected 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()
HttpClientRequest
getRequest
in interface HttpClientRequest
public <REQ> void setRequest(REQ aRequest)
HttpClientRequest
setRequest
in interface HttpClientRequest
aRequest
- The request to be stored by the request property.public String toHttpBody() throws BadRequestException
HttpClientRequest
ContentType
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 HttpClientRequest
String
instance represented by the
implementing instance.BadRequestException
Copyright © 2016. All rights reserved.