B
- the type of the bodypublic class SimpleHttpRequest<B> extends Object implements MutableHttpRequest<B>
MutableHttpRequest
implementation.Constructor and Description |
---|
SimpleHttpRequest(HttpMethod method,
String uri,
B body)
Simple
MutableHttpRequest implementation. |
Modifier and Type | Method and Description |
---|---|
MutableHttpRequest<B> |
body(B body)
Sets the body.
|
MutableHttpRequest<B> |
cookie(Cookie cookie)
Sets the specified cookie on the request.
|
MutableConvertibleValues<Object> |
getAttributes()
A
MutableConvertibleValues of the attributes for this HTTP message. |
Optional<B> |
getBody() |
Cookies |
getCookies() |
MutableHttpHeaders |
getHeaders() |
HttpMethod |
getMethod() |
MutableHttpParameters |
getParameters() |
URI |
getUri() |
MutableHttpRequest<B> |
uri(URI uri)
Sets the uri on the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, header, headers, headers
create, DELETE, DELETE, DELETE, GET, GET, getLocale, getPath, getRemoteAddress, getServerAddress, getServerName, getUserPrincipal, getUserPrincipal, HEAD, HEAD, isSecure, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttribute
getBody, getBody, getCharacterEncoding, getContentLength, getContentType
removeAttribute
getAttribute, getAttribute
public SimpleHttpRequest(HttpMethod method, String uri, B body)
MutableHttpRequest
implementation.method
- the HTTP methoduri
- the URI of the requestbody
- the optional body of the requestpublic MutableHttpRequest<B> cookie(Cookie cookie)
MutableHttpRequest
cookie
in interface MutableHttpRequest<B>
cookie
- the Cookie to return to the clientpublic MutableHttpRequest<B> uri(URI uri)
MutableHttpRequest
uri
in interface MutableHttpRequest<B>
uri
- The uri to callpublic MutableHttpRequest<B> body(B body)
MutableHttpMessage
body
in interface MutableHttpMessage<B>
body
in interface MutableHttpRequest<B>
body
- The bodypublic MutableHttpHeaders getHeaders()
getHeaders
in interface HttpMessage<B>
getHeaders
in interface MutableHttpMessage<B>
getHeaders
in interface MutableHttpRequest<B>
HttpHeaders
objectpublic Cookies getCookies()
getCookies
in interface HttpRequest<B>
Cookies
instancepublic MutableHttpParameters getParameters()
getParameters
in interface HttpRequest<B>
getParameters
in interface MutableHttpRequest<B>
public HttpMethod getMethod()
getMethod
in interface HttpRequest<B>
public URI getUri()
getUri
in interface HttpRequest<B>
public MutableConvertibleValues<Object> getAttributes()
HttpMessage
A MutableConvertibleValues
of the attributes for this HTTP message.
Attributes are designed for internal data sharing and hence are isolated from headers and parameters which are client supplied
getAttributes
in interface AttributeHolder
getAttributes
in interface MutableAttributeHolder
getAttributes
in interface HttpMessage<B>
public Optional<B> getBody()
getBody
in interface HttpMessage<B>