Package io.micronaut.function.aws.proxy
Class ApiGatewayServletRequest<T,REQ,RES>
java.lang.Object
io.micronaut.function.aws.proxy.ApiGatewayServletRequest<T,REQ,RES>
- Type Parameters:
T- The body typeREQ- The request event typeRES- The response event type
- All Implemented Interfaces:
io.micronaut.core.attr.AttributeHolder,io.micronaut.core.attr.MutableAttributeHolder,io.micronaut.core.convert.ConversionServiceAware,io.micronaut.http.HttpMessage<T>,io.micronaut.http.HttpRequest<T>,io.micronaut.http.MutableHttpMessage<T>,io.micronaut.http.MutableHttpRequest<T>,io.micronaut.servlet.http.MutableServletHttpRequest<REQ,,T> io.micronaut.servlet.http.ServletExchange<REQ,,RES> io.micronaut.servlet.http.ServletHttpRequest<REQ,T>
- Direct Known Subclasses:
ApiGatewayProxyServletRequest,APIGatewayV2HTTPEventServletRequest
@Internal
public abstract class ApiGatewayServletRequest<T,REQ,RES>
extends Object
implements io.micronaut.servlet.http.MutableServletHttpRequest<REQ,T>, io.micronaut.servlet.http.ServletExchange<REQ,RES>
Base class for all the versions of the Gateway events.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.servlet.http.ServletHttpRequest
io.micronaut.servlet.http.ServletHttpRequest.AsyncExecution, io.micronaut.servlet.http.ServletHttpRequest.AsyncExecutionCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.micronaut.core.convert.ConversionServiceprotected final REQFields inherited from interface io.micronaut.http.HttpRequest
SCHEME_HTTP, SCHEME_HTTPS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApiGatewayServletRequest(io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry, REQ request, URI uri, io.micronaut.http.HttpMethod httpMethod, org.slf4j.Logger log, io.micronaut.servlet.http.BodyBuilder bodyBuilder) -
Method Summary
Modifier and TypeMethodDescription<B> io.micronaut.http.MutableHttpRequest<B>body(B body) io.micronaut.http.MutableHttpRequest<T>cookie(io.micronaut.http.cookie.Cookie cookie) io.micronaut.core.convert.value.MutableConvertibleValues<Object>getBody()<B> Optional<B>getBody(io.micronaut.core.type.Argument<B> arg) abstract byte[]io.micronaut.http.cookie.Cookiesio.micronaut.http.HttpMethodgetParametersFromBody(Map<String, String> queryStringParameters) Parse the parameters from the body.getUri()protected booleanisFormSubmission(io.micronaut.http.MediaType contentType) voidsetConversionService(io.micronaut.core.convert.ConversionService conversionService) io.micronaut.http.MutableHttpRequest<T>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, getBodyWriter, getCharacterEncoding, getContentLength, getContentTypeMethods inherited from interface io.micronaut.http.HttpRequest
accept, getCertificate, getHttpVersion, getLocale, getMethodName, getOrigin, getPath, getRemoteAddress, getServerAddress, getServerName, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttributeMethods 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, cookies, getHeaders, getParameters, header, headers, headers, uriMethods inherited from interface io.micronaut.servlet.http.ServletExchange
getResponseMethods inherited from interface io.micronaut.servlet.http.ServletHttpRequest
executeAsync, getContextPath, isAsyncSupported
-
Field Details
-
conversionService
protected io.micronaut.core.convert.ConversionService conversionService -
requestEvent
-
-
Constructor Details
-
ApiGatewayServletRequest
-
-
Method Details
-
getBodyBytes
- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin interfaceio.micronaut.servlet.http.ServletHttpRequest<T,REQ> - Throws:
IOException
-
getRequest
-
getReader
- Specified by:
getReaderin interfaceio.micronaut.servlet.http.ServletHttpRequest<T,REQ> - Throws:
IOException
-
getNativeRequest
-
getMethod
public io.micronaut.http.HttpMethod getMethod()- Specified by:
getMethodin interfaceio.micronaut.http.HttpRequest<T>
-
getUri
- Specified by:
getUriin interfaceio.micronaut.http.HttpRequest<T>
-
getCookies
@NonNull public io.micronaut.http.cookie.Cookies getCookies()- Specified by:
getCookiesin interfaceio.micronaut.http.HttpRequest<T>
-
getAttributes
- Specified by:
getAttributesin interfaceio.micronaut.core.attr.AttributeHolder- Specified by:
getAttributesin interfaceio.micronaut.http.HttpMessage<T>- Specified by:
getAttributesin interfaceio.micronaut.core.attr.MutableAttributeHolder
-
getBody
- Specified by:
getBodyin interfaceio.micronaut.http.HttpMessage<T>
-
getBody
- Specified by:
getBodyin interfaceio.micronaut.http.HttpMessage<T>
-
isFormSubmission
protected boolean isFormSubmission(io.micronaut.http.MediaType contentType) - Parameters:
contentType- Content Type- Returns:
- returns true if the content type is either application/x-www-form-urlencoded or multipart/form-data
-
cookie
- Specified by:
cookiein interfaceio.micronaut.http.MutableHttpRequest<T>
-
uri
- Specified by:
uriin interfaceio.micronaut.http.MutableHttpRequest<T>
-
body
public <B> io.micronaut.http.MutableHttpRequest<B> body(B body) -
getParametersFromBody
protected MapListOfStringAndMapStringMutableHttpParameters getParametersFromBody(Map<String, String> queryStringParameters) Parse the parameters from the body.- Parameters:
queryStringParameters- Any query string parameters- Returns:
- The parameters
-
setConversionService
public void setConversionService(io.micronaut.core.convert.ConversionService conversionService) - Specified by:
setConversionServicein interfaceio.micronaut.core.convert.ConversionServiceAware
-