Package dev.voidframework.web.http
Interface HttpRequest
- All Known Implementing Classes:
UndertowRequest
public interface HttpRequest
An HTTP request.
-
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.
-
Method Details
-
getCharset
String getCharset()Return the request charset.- Returns:
- The request charset
-
getCookie
Return a cookie.- Parameters:
cookieName- The cookie name- Returns:
- The cookie, otherwise, null
-
getHeader
Return a single header.- Parameters:
headerName- The header name- Returns:
- The requested header value, otherwise, a null value
-
getHeaders
Return all headers.- Returns:
- All headers
-
getHttpMethod
HttpMethod getHttpMethod()Get the HTTP request method.- Returns:
- The request method
-
getInputSteam
InputStream getInputSteam()Get the input stream to read the request. Can only be called one time.- Returns:
- The input stream
-
getQueryString
String getQueryString()Return the query string, without the leading "?".- Returns:
- The query string
-
getQueryStringParameter
Return the query string parameter value.- Parameters:
parameterName- The parameter name- Returns:
- The query string parameter value
-
getQueryStringParameters
Return all query string parameters.- Returns:
- All query string parameters
-
getRemoteHostName
String getRemoteHostName()Return the remote host that this request was sent to.- Returns:
- The remote host name
-
getRequestURL
String getRequestURL()Return the complete URL as seen by the user.- Returns:
- The request URL
-
getRequestURI
String getRequestURI()Return the original request URI. This is not decoded in any way, and does not include the query string.- Returns:
- The request URI
-
getBodyContent
HttpRequestBodyContent getBodyContent()Return the body content;- Returns:
- The body content
-