Interface HttpRequest
- All Known Implementing Classes:
BaseHttpRequest
,DelegatingHttpRequest
,HttpServerRequest
,HttpServletInputMessage
,MockHttpRequest
,NettyHttpRequest
,PrefixedFormFieldsHttpRequest
,Servlet3AsyncHttpRequest
,VertxHttpRequest
public interface HttpRequest
Bridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Were form parameters read before marshalling to body?void
getAttribute
(String attribute) Map of contextual data.default Optional
<jakarta.ws.rs.core.EntityPart> getFormEntityPart
(String name) Returns the optional entity part for amultipart/form-data
request.default List
<jakarta.ws.rs.core.EntityPart> Returns for entity parts for amultipart/form-data
request.application/x-www-form-urlencoded parametersjakarta.ws.rs.core.HttpHeaders
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.Returns the fully qualified name of the client or the last proxy that sent the request.jakarta.ws.rs.core.UriInfo
getUri()
This method *MUST* always return the same instance.boolean
void
removeAttribute
(String name) void
setAttribute
(String name, Object value) void
setHttpMethod
(String method) void
setInputStream
(InputStream stream) If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().void
setRequestUri
(URI requestUri) Updates the object returned bygetUri()
.void
setRequestUri
(URI baseUri, URI requestUri) Updates the object returned bygetUri()
.boolean
-
Method Details
-
getHttpHeaders
jakarta.ws.rs.core.HttpHeaders getHttpHeaders() -
getMutableHeaders
-
getInputStream
InputStream getInputStream() -
setInputStream
If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest- Parameters:
stream
- input stream
-
getUri
jakarta.ws.rs.core.UriInfo getUri()This method *MUST* always return the same instance.- Returns:
- uri info
-
getHttpMethod
String getHttpMethod() -
setHttpMethod
-
setRequestUri
Updates the object returned bygetUri()
.- Parameters:
requestUri
- request uri- Throws:
IllegalStateException
-
setRequestUri
Updates the object returned bygetUri()
.- Parameters:
baseUri
- base urirequestUri
- request uri- Throws:
IllegalStateException
-
getFormParameters
-
getDecodedFormParameters
-
getFormEntityParts
Returns for entity parts for amultipart/form-data
request.- Returns:
- the entity parts or an empty list
-
getFormEntityPart
-
formParametersRead
boolean formParametersRead()Were form parameters read before marshalling to body?- Returns:
-
getAttribute
-
setAttribute
-
removeAttribute
-
getAttributeNames
Enumeration<String> getAttributeNames() -
getAsyncContext
ResteasyAsynchronousContext getAsyncContext() -
isInitial
boolean isInitial() -
forward
-
wasForwarded
boolean wasForwarded() -
getRemoteAddress
String getRemoteAddress()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- a
String
containing the IP address of the client that sent the request
-
getRemoteHost
String getRemoteHost()Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.- Returns:
- a
String
containing the fully qualified name of the client
-