# Uses of Interface
org.springframework.http.HttpRequest

Packages that use HttpRequest
Package
Description
org.springframework.http.client
Contains an abstraction over client-side HTTP.
org.springframework.http.client.support
This package provides generic HTTP support classes, to be used by higher-level classes like RestTemplate.
org.springframework.http.server
Contains an abstraction over server-side HTTP.
org.springframework.http.server.reactive
Abstractions for reactive HTTP server support including a `ServerHttpRequest` and `ServerHttpResponse` along with an `HttpHandler` for processing.
org.springframework.web.client
Core package of the client-side web support.
org.springframework.web.multipart.support
Support classes for the multipart resolution framework.
org.springframework.web.util
Miscellaneous web utility classes, such as HTML escaping and cookie handling.

## Uses of HttpRequest in org.springframework.http.client

Subinterfaces of HttpRequest in org.springframework.http.client
Modifier and Type
Interface
Description
`interface`
`ClientHttpRequest`
Represents a client-side HTTP request.
Classes in org.springframework.http.client that implement HttpRequest
Modifier and Type
Class
Description
`class`
`AbstractClientHttpRequest`
Abstract base for `ClientHttpRequest` that makes sure that headers and body are not written multiple times.
Methods in org.springframework.http.client with parameters of type HttpRequest
Modifier and Type
Method
Description
`ClientHttpResponse`
ClientHttpRequestExecution.`execute(HttpRequest request, byte[] body)`
Execute the request with the given request attributes and body, and return the response.
`ClientHttpResponse`
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

Classes in org.springframework.http.client.support that implement HttpRequest
Modifier and Type
Class
Description
`class`
`HttpRequestWrapper`
Provides a convenient implementation of the `HttpRequest` interface that can be overridden to adapt the request.
Methods in org.springframework.http.client.support that return HttpRequest
Modifier and Type
Method
Description
`HttpRequest`
HttpRequestWrapper.`getRequest()`
Return the wrapped request.
Methods in org.springframework.http.client.support with parameters of type HttpRequest
Modifier and Type
Method
Description
`ClientHttpResponse`
BasicAuthenticationInterceptor.`intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution)`
Constructors in org.springframework.http.client.support with parameters of type HttpRequest
Modifier
Constructor
Description
``
`HttpRequestWrapper(HttpRequest request)`
Create a new `HttpRequest` wrapping the given request object.

## Uses of HttpRequest in org.springframework.http.server

Subinterfaces of HttpRequest in org.springframework.http.server
Modifier and Type
Interface
Description
`interface`
`ServerHttpRequest`
Represents a server-side HTTP request.
Classes in org.springframework.http.server that implement HttpRequest
Modifier and Type
Class
Description
`class`
`ServletServerHttpRequest`
`ServerHttpRequest` implementation that is based on a `HttpServletRequest`.

## Uses of HttpRequest in org.springframework.http.server.reactive

Subinterfaces of HttpRequest in org.springframework.http.server.reactive
Modifier and Type
Interface
Description
`interface`
`ServerHttpRequest`
Represents a reactive server-side HTTP request.
Classes in org.springframework.http.server.reactive that implement HttpRequest
Modifier and Type
Class
Description
`class`
`AbstractServerHttpRequest`
Common base class for `ServerHttpRequest` implementations.
`class`
`ServerHttpRequestDecorator`
Wraps another `ServerHttpRequest` and delegates all methods to it.

## Uses of HttpRequest in org.springframework.web.client

Methods in org.springframework.web.client with parameters of type HttpRequest
Modifier and Type
Method
Description
`T`
RestClient.RequestHeadersSpec.ExchangeFunction.`exchange(HttpRequest clientRequest, RestClient.RequestHeadersSpec.ConvertibleClientHttpResponse clientResponse)`
Exchange the given response into a value of type `T`.
`T`
RestClient.RequestHeadersSpec.RequiredValueExchangeFunction.`exchange(HttpRequest clientRequest, RestClient.RequestHeadersSpec.ConvertibleClientHttpResponse clientResponse)`
Exchange the given response into a value of type `T`.
`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

Classes in org.springframework.web.multipart.support that implement HttpRequest
Modifier and Type
Class
Description
`class`
`RequestPartServletServerHttpRequest`
`ServerHttpRequest` implementation that accesses one part of a multipart request.

## Uses of HttpRequest in org.springframework.web.util

Methods in org.springframework.web.util with parameters of type HttpRequest
Modifier and Type
Method
Description
`static UriComponentsBuilder`
UriComponentsBuilder.`fromHttpRequest(HttpRequest request)`
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of `ForwardedHeaderUtils.adaptFromForwardedHeaders(java.net.URI, org.springframework.http.HttpHeaders)`; to be removed in 7.0
`static boolean`
WebUtils.`isSameOrigin(HttpRequest request)`
Check if the request is a same-origin one, based on `Origin`, `Host`, `Forwarded`, `X-Forwarded-Proto`, `X-Forwarded-Host` and `X-Forwarded-Port` headers.
`static boolean`
WebUtils.`isValidOrigin(HttpRequest request, Collection<String> allowedOrigins)`
Check the given request origin against a list of allowed origins.