- All Superinterfaces:
HeaderFieldsAccessor<RequestHeaderFields>,HttpBodyAccessor.HttpBodyProvider<BadRequestException>,HttpMethodAccessor,HttpRequest,RedirectDepthAccessor,RedirectDepthAccessor.RedirectDepthMutator,RedirectDepthAccessor.RedirectDepthProperty,UrlAccessor
- All Known Subinterfaces:
HttpClientRequest.HttpClientRequestBuilder
- All Known Implementing Classes:
HttpClientRequestImpl
public interface HttpClientRequest extends HttpRequest, HttpBodyAccessor.HttpBodyProvider<BadRequestException>, RedirectDepthAccessor.RedirectDepthProperty
Defines a
HttpClientRequest being the request as produced by the
client.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHttpClientRequest.HttpClientRequestBuilderBuilder for theHttpClientRequestinterface.Nested classes/interfaces inherited from interface org.refcodes.web.HeaderFieldsAccessor
HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>Nested classes/interfaces inherited from interface org.refcodes.web.HttpMethodAccessor
HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodPropertyNested classes/interfaces inherited from interface org.refcodes.web.RedirectDepthAccessor
RedirectDepthAccessor.RedirectDepthBuilder<B extends RedirectDepthAccessor.RedirectDepthBuilder<B>>, RedirectDepthAccessor.RedirectDepthMutator, RedirectDepthAccessor.RedirectDepthPropertyNested classes/interfaces inherited from interface org.refcodes.web.UrlAccessor
UrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty -
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_REDIRECT_DEPTH -
Method Summary
Modifier and Type Method Description <REQ> REQgetRequest()Retrieves the request from the request property.<REQ> voidsetRequest(REQ aRequest)Sets the request for the request property.StringtoHttpBody()Automatically sets theContentTypeto theRequestHeaderFieldsretrieved fromHeaderFieldsAccessor.getHeaderFields().Methods inherited from interface org.refcodes.web.HeaderFieldsAccessor
getHeaderFieldsMethods inherited from interface org.refcodes.web.HttpMethodAccessor
getHttpMethodMethods inherited from interface org.refcodes.web.RedirectDepthAccessor
getRedirectDepthMethods inherited from interface org.refcodes.web.RedirectDepthAccessor.RedirectDepthMutator
setRedirectDepthMethods inherited from interface org.refcodes.web.RedirectDepthAccessor.RedirectDepthProperty
letRedirectDepthMethods inherited from interface org.refcodes.web.UrlAccessor
getUrl
-
Field Details
-
DEFAULT_REDIRECT_DEPTH
static final int DEFAULT_REDIRECT_DEPTH- See Also:
- Constant Field Values
-
-
Method Details
-
toHttpBody
Automatically sets theContentTypeto theRequestHeaderFieldsretrieved fromHeaderFieldsAccessor.getHeaderFields(). (seeHeaderFields.putContentType(org.refcodes.web.HttpMediaType)) Converts an object representing the HTTP body to aStringinstance. Automatically determines theContentTypefrom any headers when applicable.- Specified by:
toHttpBodyin interfaceHttpBodyAccessor.HttpBodyProvider<BadRequestException>- Returns:
- The converted
Stringinstance represented by the according object. - Throws:
BadRequestException
-
getRequest
<REQ> REQ getRequest()Retrieves the request from the request property.- Type Parameters:
REQ- the generic type- Returns:
- The request stored by the request property.
-
setRequest
<REQ> void setRequest(REQ aRequest)Sets the request for the request property. TheHttpClientRequestImpl.setRequest(Object)supports theHttpBodyMapto marshal anHttpBodyMapinto an HTTP Request-Body.- Type Parameters:
REQ- the generic type- Parameters:
aRequest- The request to be stored by the request property.
-