Package dev.voidframework.web.server
Class UndertowRequest
java.lang.Object
dev.voidframework.web.server.UndertowRequest
- All Implemented Interfaces:
HttpRequest
Undertow
HttpRequest implementation.-
Constructor Summary
ConstructorsConstructorDescriptionUndertowRequest(io.undertow.server.HttpServerExchange httpServerExchange, HttpRequestBodyContent httpRequestBodyContent) Build a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the body content;Return the request charset.Return a cookie.Return a single header.Return all headers.Get the HTTP request method.Get the input stream to read the request.Return the query string, without the leading "?".getQueryStringParameter(String parameterName) Return the query string parameter value.Return all query string parameters.Return the remote host that this request was sent to.Return the original request URI.Return the complete URL as seen by the user.
-
Constructor Details
-
UndertowRequest
public UndertowRequest(io.undertow.server.HttpServerExchange httpServerExchange, HttpRequestBodyContent httpRequestBodyContent) Build a new instance.- Parameters:
httpServerExchange- Current Http server exchangehttpRequestBodyContent- Current Http request body content
-
-
Method Details
-
getCharset
Description copied from interface:HttpRequestReturn the request charset.- Specified by:
getCharsetin interfaceHttpRequest- Returns:
- The request charset
-
getCookie
Description copied from interface:HttpRequestReturn a cookie.- Specified by:
getCookiein interfaceHttpRequest- Parameters:
cookieName- The cookie name- Returns:
- The cookie, otherwise, null
-
getHeader
Description copied from interface:HttpRequestReturn a single header.- Specified by:
getHeaderin interfaceHttpRequest- Parameters:
headerName- The header name- Returns:
- The requested header value, otherwise, a null value
-
getHeaders
Description copied from interface:HttpRequestReturn all headers.- Specified by:
getHeadersin interfaceHttpRequest- Returns:
- All headers
-
getHttpMethod
Description copied from interface:HttpRequestGet the HTTP request method.- Specified by:
getHttpMethodin interfaceHttpRequest- Returns:
- The request method
-
getInputSteam
Description copied from interface:HttpRequestGet the input stream to read the request. Can only be called one time.- Specified by:
getInputSteamin interfaceHttpRequest- Returns:
- The input stream
-
getQueryString
Description copied from interface:HttpRequestReturn the query string, without the leading "?".- Specified by:
getQueryStringin interfaceHttpRequest- Returns:
- The query string
-
getQueryStringParameter
Description copied from interface:HttpRequestReturn the query string parameter value.- Specified by:
getQueryStringParameterin interfaceHttpRequest- Parameters:
parameterName- The parameter name- Returns:
- The query string parameter value
-
getQueryStringParameters
Description copied from interface:HttpRequestReturn all query string parameters.- Specified by:
getQueryStringParametersin interfaceHttpRequest- Returns:
- All query string parameters
-
getRemoteHostName
Description copied from interface:HttpRequestReturn the remote host that this request was sent to.- Specified by:
getRemoteHostNamein interfaceHttpRequest- Returns:
- The remote host name
-
getRequestURL
Description copied from interface:HttpRequestReturn the complete URL as seen by the user.- Specified by:
getRequestURLin interfaceHttpRequest- Returns:
- The request URL
-
getRequestURI
Description copied from interface:HttpRequestReturn the original request URI. This is not decoded in any way, and does not include the query string.- Specified by:
getRequestURIin interfaceHttpRequest- Returns:
- The request URI
-
getBodyContent
Description copied from interface:HttpRequestReturn the body content;- Specified by:
getBodyContentin interfaceHttpRequest- Returns:
- The body content
-