Package io.micronaut.http.simple
Class SimpleHttpRequest<B>
java.lang.Object
io.micronaut.http.simple.SimpleHttpRequest<B>
- Type Parameters:
B- the type of the body
- All Implemented Interfaces:
AttributeHolder,MutableAttributeHolder,ConversionServiceAware,HttpMessage<B>,HttpRequest<B>,MutableHttpMessage<B>,MutableHttpRequest<B>
Simple
MutableHttpRequest implementation.- Since:
- 1.0
- Author:
- Vladimir Orany
-
Field Summary
Fields inherited from interface io.micronaut.http.HttpRequest
SCHEME_HTTP, SCHEME_HTTPS -
Constructor Summary
ConstructorsConstructorDescriptionSimpleHttpRequest(HttpMethod method, String url, B body) SimpleMutableHttpRequestimplementation. -
Method Summary
Modifier and TypeMethodDescription<T> MutableHttpRequest<T>body(T body) Sets the body.Sets the specified cookie on the request.Sets the specified cookies on the request.AMutableConvertibleValuesof the attributes for this HTTP message.getBody()getUri()voidsetConversionService(ConversionService conversionService) Sets the conversion service.Sets the uri on the request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.attr.AttributeHolder
getAttribute, getAttributeMethods inherited from interface io.micronaut.http.HttpMessage
getBody, getBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentTypeMethods inherited from interface io.micronaut.http.HttpRequest
accept, getCertificate, getHttpVersion, getLocale, getMethodName, getOrigin, getPath, getRemoteAddress, getServerAddress, getServerName, getSslSession, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttribute, setUserPrincipalMethods inherited from interface io.micronaut.core.attr.MutableAttributeHolder
removeAttributeMethods inherited from interface io.micronaut.http.MutableHttpMessage
bodyWriterMethods inherited from interface io.micronaut.http.MutableHttpRequest
accept, accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, header, headers, headers, toMutableRequest, uri
-
Constructor Details
-
SimpleHttpRequest
SimpleMutableHttpRequestimplementation.- Parameters:
method- the HTTP methodurl- the URI of the requestbody- the optional body of the request
-
-
Method Details
-
cookie
Description copied from interface:MutableHttpRequestSets the specified cookie on the request.- Specified by:
cookiein interfaceMutableHttpRequest<B>- Parameters:
cookie- the Cookie to return to the client- Returns:
- The http request
-
cookies
Description copied from interface:MutableHttpRequestSets the specified cookies on the request.- Specified by:
cookiesin interfaceMutableHttpRequest<B>- Parameters:
cookies- the Cookies to return to the client- Returns:
- The http request
-
uri
Description copied from interface:MutableHttpRequestSets the uri on the request.- Specified by:
uriin interfaceMutableHttpRequest<B>- Parameters:
uri- The uri to call- Returns:
- The http request
-
body
Description copied from interface:MutableHttpMessageSets the body.- Specified by:
bodyin interfaceMutableHttpMessage<B>- Specified by:
bodyin interfaceMutableHttpRequest<B>- Type Parameters:
T- The new body type- Parameters:
body- The body- Returns:
- This message
-
getHeaders
- Specified by:
getHeadersin interfaceHttpMessage<B>- Specified by:
getHeadersin interfaceMutableHttpMessage<B>- Specified by:
getHeadersin interfaceMutableHttpRequest<B>- Returns:
- The
HttpHeadersobject
-
getCookies
- Specified by:
getCookiesin interfaceHttpRequest<B>- Returns:
- The
Cookiesinstance
-
getParameters
- Specified by:
getParametersin interfaceHttpRequest<B>- Specified by:
getParametersin interfaceMutableHttpRequest<B>- Returns:
- The HTTP parameters contained with the URI query string
-
getMethod
- Specified by:
getMethodin interfaceHttpRequest<B>- Returns:
- The request method
-
getUri
- Specified by:
getUriin interfaceHttpRequest<B>- Returns:
- The full request URI
-
getAttributes
Description copied from interface:HttpMessageA
MutableConvertibleValuesof 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
- Specified by:
getAttributesin interfaceAttributeHolder- Specified by:
getAttributesin interfaceHttpMessage<B>- Specified by:
getAttributesin interfaceMutableAttributeHolder- Returns:
- The attributes of the message
-
getBody
- Specified by:
getBodyin interfaceHttpMessage<B>- Returns:
- The request body
-
setConversionService
Description copied from interface:ConversionServiceAwareSets the conversion service.- Specified by:
setConversionServicein interfaceConversionServiceAware- Parameters:
conversionService- The conversion service
-