B
- the type of the bodypublic class SimpleHttpRequest<B> extends java.lang.Object implements MutableHttpRequest<B>
MutableHttpRequest
implementation.SCHEME_HTTP, SCHEME_HTTPS
Constructor and Description |
---|
SimpleHttpRequest(HttpMethod method,
java.lang.String uri,
B body)
Simple
MutableHttpRequest implementation. |
Modifier and Type | Method and Description |
---|---|
<T> MutableHttpRequest<T> |
body(T body)
Sets the body.
|
MutableHttpRequest<B> |
cookie(Cookie cookie)
Sets the specified cookie on the request.
|
MutableHttpRequest<B> |
cookies(java.util.Set<Cookie> cookies)
Sets the specified cookies on the request.
|
MutableConvertibleValues<java.lang.Object> |
getAttributes()
A
MutableConvertibleValues of the attributes for this HTTP message. |
java.util.Optional<B> |
getBody() |
Cookies |
getCookies() |
MutableHttpHeaders |
getHeaders() |
HttpMethod |
getMethod() |
MutableHttpParameters |
getParameters() |
java.net.URI |
getUri() |
MutableHttpRequest<B> |
uri(java.net.URI uri)
Sets the uri on the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, header, headers, headers, uri
accept, create, create, DELETE, DELETE, DELETE, GET, GET, getCertificate, getHttpVersion, getLocale, getMethodName, getPath, getRemoteAddress, getServerAddress, getServerName, getUserPrincipal, getUserPrincipal, HEAD, HEAD, isSecure, mutate, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttribute
getBody, getBody, getCharacterEncoding, getContentLength, getContentType
removeAttribute
getAttribute, getAttribute
public SimpleHttpRequest(HttpMethod method, java.lang.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> cookies(java.util.Set<Cookie> cookies)
MutableHttpRequest
cookies
in interface MutableHttpRequest<B>
cookies
- the Cookies to return to the clientpublic MutableHttpRequest<B> uri(java.net.URI uri)
MutableHttpRequest
uri
in interface MutableHttpRequest<B>
uri
- The uri to callpublic <T> MutableHttpRequest<T> body(T body)
MutableHttpMessage
body
in interface MutableHttpMessage<B>
body
in interface MutableHttpRequest<B>
T
- The new body typebody
- 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 java.net.URI getUri()
getUri
in interface HttpRequest<B>
public MutableConvertibleValues<java.lang.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 java.util.Optional<B> getBody()
getBody
in interface HttpMessage<B>