Uses of Interface
org.springframework.http.HttpRequest
Package
Description
Contains an abstraction over client-side HTTP.
This package provides generic HTTP support classes,
to be used by higher-level classes like RestTemplate.
Contains an abstraction over server-side HTTP.
Abstractions for reactive HTTP server support including a
ServerHttpRequest
and
ServerHttpResponse
along with an
HttpHandler
for processing.Mock implementations of client-side HTTP abstractions.
Mock implementations of reactive HTTP server contracts.
Core package of the client-side web support.
Support classes for the multipart resolution framework.
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive
reactive HTTP adapter layer.Classes supporting the
org.springframework.web.reactive.function.client
package.Miscellaneous web utility classes, such as HTML escaping and cookie handling.
-
Uses of HttpRequest in org.springframework.http.client
Modifier and TypeInterfaceDescriptioninterface
Represents a client-side HTTP request.Modifier and TypeClassDescriptionclass
Abstract base forClientHttpRequest
that makes sure that headers and body are not written multiple times.Modifier and TypeMethodDescriptionClientHttpRequestExecution.execute
(HttpRequest request, byte[] body) Execute the request with the given request attributes and body, and return the response.ClientHttpRequestInterceptor.intercept
(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) Intercept the given request, and return a response. -
Uses of HttpRequest in org.springframework.http.client.support
Modifier and TypeClassDescriptionclass
Provides a convenient implementation of theHttpRequest
interface that can be overridden to adapt the request.Modifier and TypeMethodDescriptionBasicAuthenticationInterceptor.intercept
(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) ModifierConstructorDescriptionHttpRequestWrapper
(HttpRequest request) Create a newHttpRequest
wrapping the given request object. -
Uses of HttpRequest in org.springframework.http.server
Modifier and TypeInterfaceDescriptioninterface
Represents a server-side HTTP request.Modifier and TypeClassDescriptionclass
ServerHttpRequest
implementation that is based on aHttpServletRequest
. -
Uses of HttpRequest in org.springframework.http.server.reactive
Modifier and TypeInterfaceDescriptioninterface
Represents a reactive server-side HTTP request.Modifier and TypeClassDescriptionclass
Common base class forServerHttpRequest
implementations.class
Wraps anotherServerHttpRequest
and delegates all methods to it. -
Uses of HttpRequest in org.springframework.mock.http.client
-
Uses of HttpRequest in org.springframework.mock.http.server.reactive
Modifier and TypeClassDescriptionfinal class
Mock extension ofAbstractServerHttpRequest
for use in tests without an actual server. -
Uses of HttpRequest in org.springframework.web.client
Modifier and TypeMethodDescriptionRestClient.RequestHeadersSpec.ExchangeFunction.exchange
(HttpRequest clientRequest, RestClient.RequestHeadersSpec.ConvertibleClientHttpResponse clientResponse) Exchange the given response into a typeT
.void
RestClient.ResponseSpec.ErrorHandler.handle
(HttpRequest request, ClientHttpResponse response) Handle the error in the given response. -
Uses of HttpRequest in org.springframework.web.multipart.support
Modifier and TypeClassDescriptionclass
ServerHttpRequest
implementation that accesses one part of a multipart request. -
Uses of HttpRequest in org.springframework.web.reactive.function.client
Modifier and TypeMethodDescriptionWebClientResponseException.getRequest()
Return the corresponding request.ClientResponse.request()
Return the request associated with the response.Modifier and TypeMethodDescriptionstatic WebClientResponseException
WebClientResponseException.create
(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) CreateWebClientResponseException
or an HTTP status specific subclass.static WebClientResponseException
WebClientResponseException.create
(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) CreateWebClientResponseException
or an HTTP status specific subclass.ClientResponse.Builder.request
(HttpRequest request) Set the request associated with the response.ModifierConstructorDescriptionUnknownHttpStatusCodeException
(int statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset, HttpRequest request) Create a new instance of theUnknownHttpStatusCodeException
with the given parameters.UnknownHttpStatusCodeException
(HttpStatusCode statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset, HttpRequest request) Create a new instance of theUnknownHttpStatusCodeException
with the given parameters.WebClientResponseException
(int status, String reasonPhrase, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) Constructor with response data only, and a default message.WebClientResponseException
(String message, int statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset, HttpRequest request) Constructor with a prepared message.WebClientResponseException
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset, HttpRequest request) Constructor with a prepared message.WebClientResponseException
(HttpStatusCode statusCode, String reasonPhrase, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) Constructor with response data only, and a default message. -
Uses of HttpRequest in org.springframework.web.reactive.function.client.support
-
Uses of HttpRequest in org.springframework.web.util
Modifier and TypeMethodDescriptionstatic UriComponentsBuilder
UriComponentsBuilder.fromHttpRequest
(HttpRequest request) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
WebUtils.isSameOrigin
(HttpRequest request) Check if the request is a same-origin one, based onOrigin
,Host
,Forwarded
,X-Forwarded-Proto
,X-Forwarded-Host
andX-Forwarded-Port
headers.static boolean
WebUtils.isValidOrigin
(HttpRequest request, Collection<String> allowedOrigins) Check the given request origin against a list of allowed origins.
ForwardedHeaderUtils.adaptFromForwardedHeaders(java.net.URI, org.springframework.http.HttpHeaders)
; to be removed in 6.2