Uses of Class
org.springframework.http.HttpHeaders
Packages that use HttpHeaders
Package
Description
Contains a basic abstraction over client/server-side HTTP.
Contains an abstraction over client-side HTTP.
Abstractions for reactive HTTP client support including
ClientHttpRequest
and
ClientHttpResponse
as well as a
ClientHttpConnector
.This package provides generic HTTP support classes,
to be used by higher-level classes like RestTemplate.
Multipart support.
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
Provides HttpMessageConverter implementations for handling JSON.
Provides HttpMessageConverter implementations for handling XML.
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/server-side HTTP abstractions.
Mock implementations of reactive HTTP client contracts.
A comprehensive set of Servlet API 4.0 mock objects, targeted at usage with
Spring's Web MVC framework.
Mock objects for the functional web framework.
Contains built-in
ResponseCreator
implementations.Support for testing Spring WebFlux server endpoints via
WebTestClient
.Contains built-in
RequestBuilder
implementations.Contains built-in
ResultMatcher
and ResultHandler
implementations.Common, generic interfaces that define minimal boundary points
between Spring's web infrastructure and other framework modules.
Core package of the client-side web support.
Multipart resolution framework for handling file uploads.
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.Provides the types that make up Spring's functional web framework for Reactive environments.
Classes supporting the
org.springframework.web.reactive.function.server
package.Support classes for serving static resources.
Infrastructure for annotation-based handler method processing.
Support for result handling through view resolution.
Abstractions and support classes for reactive WebSocket interactions.
Client support for WebSocket interactions.
Core interfaces and classes for Spring's generic, reactive web support.
Support for creating a client proxy for an HTTP service annotated with
HttpExchange
methods.Provides servlets that integrate with the application context
infrastructure, and the core interfaces and classes for the
Spring web MVC framework.
Provides the types that make up Spring's functional web framework for Servlet environments.
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package.Support classes for serving static resources.
Common abstractions and Spring configuration support for WebSocket applications.
Adapter classes for the Jetty WebSocket API.
Adapter classes for the standard Java WebSocket API.
Client-side abstractions for WebSocket applications.
Client-side support for the Jetty WebSocket API.
Client-side classes for use with standard Java WebSocket endpoints.
Convenient
WebSocketHandler
implementations and decorators.SockJS client implementation of
WebSocketClient
.SockJS specific implementations of
WebSocketSession
.-
Uses of HttpHeaders in org.springframework.http
Fields in org.springframework.http declared as HttpHeadersModifier and TypeFieldDescriptionstatic final HttpHeaders
HttpHeaders.EMPTY
An emptyHttpHeaders
instance (immutable).Methods in org.springframework.http that return HttpHeadersModifier and TypeMethodDescriptionHttpEntity.getHeaders()
Returns the headers of this entity.HttpMessage.getHeaders()
Return the headers of this message.static HttpHeaders
HttpHeaders.readOnlyHttpHeaders
(HttpHeaders headers) Apply a read-onlyHttpHeaders
wrapper around the given headers, if necessary.static HttpHeaders
HttpHeaders.readOnlyHttpHeaders
(MultiValueMap<String, String> headers) Apply a read-onlyHttpHeaders
wrapper around the given headers, if necessary.static HttpHeaders
HttpHeaders.writableHttpHeaders
(HttpHeaders headers) Remove any read-only wrapper that may have been previously applied around the given headers viareadOnlyHttpHeaders(HttpHeaders)
.Methods in org.springframework.http with parameters of type HttpHeadersModifier and TypeMethodDescriptionRequestEntity.HeadersBuilder.headers
(HttpHeaders headers) Copy the given headers into the entity's headers map.ResponseEntity.HeadersBuilder.headers
(HttpHeaders headers) Copy the given headers into the entity's headers map.static HttpHeaders
HttpHeaders.readOnlyHttpHeaders
(HttpHeaders headers) Apply a read-onlyHttpHeaders
wrapper around the given headers, if necessary.static HttpHeaders
HttpHeaders.writableHttpHeaders
(HttpHeaders headers) Remove any read-only wrapper that may have been previously applied around the given headers viareadOnlyHttpHeaders(HttpHeaders)
.Method parameters in org.springframework.http with type arguments of type HttpHeadersModifier and TypeMethodDescriptionRequestEntity.HeadersBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this entity's headers with the given consumer.ResponseEntity.HeadersBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this entity's headers with the given consumer. -
Uses of HttpHeaders in org.springframework.http.client
Methods in org.springframework.http.client that return HttpHeadersMethods in org.springframework.http.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected abstract ClientHttpResponse
AbstractClientHttpRequest.executeInternal
(HttpHeaders headers) Abstract template method that writes the given headers and content to the HTTP request.protected abstract OutputStream
AbstractClientHttpRequest.getBodyInternal
(HttpHeaders headers) Abstract template method that returns the body.Method parameters in org.springframework.http.client with type arguments of type HttpHeadersModifier and TypeMethodDescriptionMultipartBodyBuilder.PartBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate the part headers through the given consumer. -
Uses of HttpHeaders in org.springframework.http.client.reactive
Methods in org.springframework.http.client.reactive that return HttpHeadersModifier and TypeMethodDescriptionAbstractClientHttpRequest.getHeaders()
ClientHttpRequestDecorator.getHeaders()
ClientHttpResponseDecorator.getHeaders()
protected HttpHeaders
AbstractClientHttpRequest.initReadOnlyHeaders()
Initialize the read-only headers after the request is committed.Constructors in org.springframework.http.client.reactive with parameters of type HttpHeaders -
Uses of HttpHeaders in org.springframework.http.client.support
Methods in org.springframework.http.client.support that return HttpHeadersModifier and TypeMethodDescriptionHttpRequestWrapper.getHeaders()
Return the headers of the wrapped request. -
Uses of HttpHeaders in org.springframework.http.codec.multipart
Methods in org.springframework.http.codec.multipart that return HttpHeadersModifier and TypeMethodDescriptionPart.headers()
Return the headers associated with the part.PartEvent.headers()
Return the headers of the part that this event belongs to.Methods in org.springframework.http.codec.multipart with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<DataBuffer>
MultipartWriterSupport.generatePartHeaders
(HttpHeaders headers, DataBufferFactory bufferFactory) Method parameters in org.springframework.http.codec.multipart with type arguments of type HttpHeadersModifier and TypeMethodDescriptionstatic reactor.core.publisher.Flux<FilePartEvent>
FilePartEvent.create
(String partName, String filename, MediaType contentType, reactor.core.publisher.Flux<DataBuffer> contents, Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEvent
objects based on the given name, FilePartEvent.filename(), content-type, and contents.static reactor.core.publisher.Flux<FilePartEvent>
FilePartEvent.create
(String name, Path path, Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEvent
objects based on the given name and file path.static reactor.core.publisher.Flux<FilePartEvent>
FilePartEvent.create
(String name, Resource resource, Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEvent
objects based on the given name and resource.static reactor.core.publisher.Mono<FormPartEvent>
FormPartEvent.create
(String name, String value, Consumer<HttpHeaders> headersConsumer) -
Uses of HttpHeaders in org.springframework.http.converter
Methods in org.springframework.http.converter with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected void
AbstractHttpMessageConverter.addDefaultHeaders
(HttpHeaders headers, T t, MediaType contentType) Add default headers to the output message.protected void
StringHttpMessageConverter.addDefaultHeaders
(HttpHeaders headers, String s, MediaType type) -
Uses of HttpHeaders in org.springframework.http.converter.json
Methods in org.springframework.http.converter.json that return HttpHeadersConstructors in org.springframework.http.converter.json with parameters of type HttpHeadersModifierConstructorDescriptionMappingJacksonInputMessage
(InputStream body, HttpHeaders headers) MappingJacksonInputMessage
(InputStream body, HttpHeaders headers, Class<?> deserializationView) -
Uses of HttpHeaders in org.springframework.http.converter.xml
Methods in org.springframework.http.converter.xml with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected abstract T
AbstractXmlHttpMessageConverter.readFromSource
(Class<? extends T> clazz, HttpHeaders headers, Source source) Abstract template method called fromAbstractHttpMessageConverter.read(Class, HttpInputMessage)
.protected T
Jaxb2CollectionHttpMessageConverter.readFromSource
(Class<? extends T> clazz, HttpHeaders headers, Source source) protected Object
Jaxb2RootElementHttpMessageConverter.readFromSource
(Class<?> clazz, HttpHeaders headers, Source source) protected Object
MarshallingHttpMessageConverter.readFromSource
(Class<?> clazz, HttpHeaders headers, Source source) protected abstract void
AbstractXmlHttpMessageConverter.writeToResult
(T t, HttpHeaders headers, Result result) Abstract template method called fromAbstractXmlHttpMessageConverter.writeInternal(Object, HttpOutputMessage)
.protected void
Jaxb2CollectionHttpMessageConverter.writeToResult
(T t, HttpHeaders headers, Result result) protected void
Jaxb2RootElementHttpMessageConverter.writeToResult
(Object o, HttpHeaders headers, Result result) protected void
MarshallingHttpMessageConverter.writeToResult
(Object o, HttpHeaders headers, Result result) -
Uses of HttpHeaders in org.springframework.http.server
Methods in org.springframework.http.server that return HttpHeadersModifier and TypeMethodDescriptionDelegatingServerHttpResponse.getHeaders()
ServletServerHttpRequest.getHeaders()
ServletServerHttpResponse.getHeaders()
-
Uses of HttpHeaders in org.springframework.http.server.reactive
Methods in org.springframework.http.server.reactive that return HttpHeadersModifier and TypeMethodDescriptionAbstractServerHttpRequest.getHeaders()
AbstractServerHttpResponse.getHeaders()
ServerHttpRequestDecorator.getHeaders()
ServerHttpResponseDecorator.getHeaders()
Method parameters in org.springframework.http.server.reactive with type arguments of type HttpHeadersModifier and TypeMethodDescriptionServerHttpRequest.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate request headers.Constructors in org.springframework.http.server.reactive with parameters of type HttpHeadersModifierConstructorDescriptionAbstractListenerServerHttpResponse
(DataBufferFactory bufferFactory, HttpHeaders headers) AbstractServerHttpRequest
(URI uri, String contextPath, HttpHeaders headers) Constructor with the URI and headers for the request.AbstractServerHttpResponse
(DataBufferFactory dataBufferFactory, HttpHeaders headers) -
Uses of HttpHeaders in org.springframework.mock.http
Methods in org.springframework.mock.http that return HttpHeadersModifier and TypeMethodDescriptionMockHttpInputMessage.getHeaders()
MockHttpOutputMessage.getHeaders()
Return the headers. -
Uses of HttpHeaders in org.springframework.mock.http.client.reactive
Methods in org.springframework.mock.http.client.reactive that return HttpHeaders -
Uses of HttpHeaders in org.springframework.mock.web
Methods in org.springframework.mock.web that return HttpHeadersModifier and TypeMethodDescriptionfinal HttpHeaders
MockPart.getHeaders()
Return theHttpHeaders
backing header related accessor methods, allowing for populating selected header entries.MockMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) MockMultipartHttpServletRequest.getRequestHeaders()
-
Uses of HttpHeaders in org.springframework.mock.web.reactive.function.server
Methods in org.springframework.mock.web.reactive.function.server with parameters of type HttpHeaders -
Uses of HttpHeaders in org.springframework.test.web.client.response
Methods in org.springframework.test.web.client.response with parameters of type HttpHeadersModifier and TypeMethodDescriptionDefaultResponseCreator.headers
(HttpHeaders headers) Copy all given headers. -
Uses of HttpHeaders in org.springframework.test.web.reactive.server
Methods in org.springframework.test.web.reactive.server that return HttpHeadersModifier and TypeMethodDescriptionExchangeResult.getRequestHeaders()
Return the request headers sent to the server.ExchangeResult.getResponseHeaders()
Return the response headers received from the server.Method parameters in org.springframework.test.web.reactive.server with type arguments of type HttpHeadersModifier and TypeMethodDescriptionWebTestClient.Builder.defaultHeaders
(Consumer<HttpHeaders> headersConsumer) Manipulate the default headers with the given consumer.WebTestClient.RequestHeadersSpec.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate the request's headers with the given consumer. -
Uses of HttpHeaders in org.springframework.test.web.servlet.request
Methods in org.springframework.test.web.servlet.request with parameters of type HttpHeadersModifier and TypeMethodDescriptionMockHttpServletRequestBuilder.headers
(HttpHeaders httpHeaders) Add all headers to the request. -
Uses of HttpHeaders in org.springframework.test.web.servlet.result
Methods in org.springframework.test.web.servlet.result that return HttpHeadersModifier and TypeMethodDescriptionprotected final HttpHeaders
PrintingResultHandler.getRequestHeaders
(MockHttpServletRequest request) protected final HttpHeaders
PrintingResultHandler.getResponseHeaders
(MockHttpServletResponse response) -
Uses of HttpHeaders in org.springframework.web
Methods in org.springframework.web that return HttpHeadersModifier and TypeMethodDescriptiondefault HttpHeaders
ErrorResponse.getHeaders()
Return headers to use for the response.ErrorResponseException.getHeaders()
HttpMediaTypeNotAcceptableException.getHeaders()
HttpMediaTypeNotSupportedException.getHeaders()
HttpRequestMethodNotSupportedException.getHeaders()
-
Uses of HttpHeaders in org.springframework.web.client
Methods in org.springframework.web.client that return HttpHeadersModifier and TypeMethodDescriptionRestClientResponseException.getResponseHeaders()
Return the HTTP response headers.UnknownContentTypeException.getResponseHeaders()
Return the HTTP response headers.RestOperations.headForHeaders
(String url, Object... uriVariables) Retrieve all headers of the resource specified by the URI template.RestOperations.headForHeaders
(String url, Map<String, ?> uriVariables) Retrieve all headers of the resource specified by the URI template.RestOperations.headForHeaders
(URI url) Retrieve all headers of the resource specified by the URL.RestTemplate.headForHeaders
(String url, Object... uriVariables) RestTemplate.headForHeaders
(String url, Map<String, ?> uriVariables) RestTemplate.headForHeaders
(URI url) Methods in org.springframework.web.client that return types with arguments of type HttpHeadersModifier and TypeMethodDescriptionprotected ResponseExtractor<HttpHeaders>
RestTemplate.headersExtractor()
Return a response extractor forHttpHeaders
.Methods in org.springframework.web.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionstatic HttpClientErrorException
HttpClientErrorException.create
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpClientErrorException.create(HttpStatusCode, String, HttpHeaders, byte[], Charset)
with an optional prepared message.static HttpClientErrorException
HttpClientErrorException.create
(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) CreateHttpClientErrorException
or an HTTP status specific subclass.static HttpServerErrorException
HttpServerErrorException.create
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpServerErrorException.create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset)
with an optional prepared message.static HttpServerErrorException
HttpServerErrorException.create
(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Create anHttpServerErrorException
or an HTTP status specific subclass.Constructors in org.springframework.web.client with parameters of type HttpHeadersModifierConstructorDescriptionHttpClientErrorException
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset) Constructor with a status code and status text, headers, and content, and a prepared message.HttpClientErrorException
(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset) Constructor with a status code and status text, headers, and content.HttpServerErrorException
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Constructor with a status code and status text, headers, content, and a prepared message.HttpServerErrorException
(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Constructor with a status code and status text, headers, and content.protected
HttpStatusCodeException
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode
, status text, content, and a response charset.protected
HttpStatusCodeException
(HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode
, status text, content, and a response charset.RestClientResponseException
(String message, int statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Construct a new instance of with the given response data.RestClientResponseException
(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Construct a new instance of with the given response data.UnknownContentTypeException
(Type targetType, MediaType contentType, int statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.UnknownContentTypeException
(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.UnknownHttpStatusCodeException
(int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct a new instance ofHttpStatusCodeException
based on a status code, status text, and response body content.UnknownHttpStatusCodeException
(String message, int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct a new instance ofHttpStatusCodeException
based on a status code, status text, and response body content. -
Uses of HttpHeaders in org.springframework.web.multipart
Methods in org.springframework.web.multipart that return HttpHeadersModifier and TypeMethodDescriptionMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) Return the headers for the specified part of the multipart request.MultipartHttpServletRequest.getRequestHeaders()
Return this request's headers as a convenient HttpHeaders instance. -
Uses of HttpHeaders in org.springframework.web.multipart.support
Methods in org.springframework.web.multipart.support that return HttpHeadersModifier and TypeMethodDescriptionRequestPartServletServerHttpRequest.getHeaders()
DefaultMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) StandardMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) AbstractMultipartHttpServletRequest.getRequestHeaders()
-
Uses of HttpHeaders in org.springframework.web.reactive.function.client
Methods in org.springframework.web.reactive.function.client that return HttpHeadersModifier and TypeMethodDescriptionClientResponse.Headers.asHttpHeaders()
Return the headers as anHttpHeaders
instance.WebClientRequestException.getHeaders()
Return the HTTP request headers.WebClientResponseException.getHeaders()
Return the HTTP response headers.ClientRequest.headers()
Return the headers of this request.Methods in org.springframework.web.reactive.function.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionstatic WebClientResponseException
WebClientResponseException.create
(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) CreateWebClientResponseException
or an HTTP status specific subclass.static 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.Method parameters in org.springframework.web.reactive.function.client with type arguments of type HttpHeadersModifier and TypeMethodDescriptionWebClient.Builder.defaultHeaders
(Consumer<HttpHeaders> headersConsumer) Provides access to everyWebClient.Builder.defaultHeader(String, String...)
declared so far with the possibility to add, replace, or remove.ClientRequest.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.ClientResponse.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.WebClient.RequestHeadersSpec.headers
(Consumer<HttpHeaders> headersConsumer) Provides access to every header declared so far with the possibility to add, replace, or remove values.Constructors in org.springframework.web.reactive.function.client with parameters of type HttpHeadersModifierConstructorDescriptionUnknownHttpStatusCodeException
(int statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Create a new instance of theUnknownHttpStatusCodeException
with the given parameters.UnknownHttpStatusCodeException
(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.WebClientRequestException
(Throwable ex, HttpMethod method, URI uri, HttpHeaders headers) Constructor for throwable.WebClientResponseException
(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Constructor with response data only, and a default message.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) Constructor with a prepared 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 HttpHeaders in org.springframework.web.reactive.function.client.support
Methods in org.springframework.web.reactive.function.client.support that return HttpHeadersMethods in org.springframework.web.reactive.function.client.support that return types with arguments of type HttpHeadersModifier and TypeMethodDescriptionreactor.core.publisher.Mono<HttpHeaders>
WebClientAdapter.requestToHeaders
(HttpRequestValues requestValues) -
Uses of HttpHeaders in org.springframework.web.reactive.function.server
Methods in org.springframework.web.reactive.function.server that return HttpHeadersModifier and TypeMethodDescriptionServerRequest.Headers.asHttpHeaders()
Get the headers as an instance ofHttpHeaders
.ServerResponse.headers()
Return the headers of this response.Methods in org.springframework.web.reactive.function.server with parameters of type HttpHeadersModifier and TypeMethodDescriptionEntityResponse.Builder.headers
(HttpHeaders headers) Copy the given headers into the entity's headers map.RenderingResponse.Builder.headers
(HttpHeaders headers) Copy the given headers into the entity's headers map.Method parameters in org.springframework.web.reactive.function.server with type arguments of type HttpHeadersModifier and TypeMethodDescriptionServerRequest.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.ServerResponse.HeadersBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer. -
Uses of HttpHeaders in org.springframework.web.reactive.function.server.support
Methods in org.springframework.web.reactive.function.server.support that return HttpHeaders -
Uses of HttpHeaders in org.springframework.web.reactive.resource
Methods in org.springframework.web.reactive.resource that return HttpHeadersModifier and TypeMethodDescriptionHttpResource.getResponseHeaders()
The HTTP headers to be contributed to the HTTP response that serves the current resource. -
Uses of HttpHeaders in org.springframework.web.reactive.result.method.annotation
Methods in org.springframework.web.reactive.result.method.annotation with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.createResponseEntity
(Object body, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Create theResponseEntity
to use from the given body, headers, and statusCode.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleErrorResponseException
(ErrorResponseException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling of anyErrorResponseException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleExceptionInternal
(Exception ex, Object body, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Internal handler method that all others in this class delegate to, for common handling, and for the creation of aResponseEntity
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleMethodNotAllowedException
(MethodNotAllowedException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofMethodNotAllowedException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleMissingRequestValueException
(MissingRequestValueException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofMissingRequestValueException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleNotAcceptableStatusException
(NotAcceptableStatusException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofNotAcceptableStatusException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleResponseStatusException
(ResponseStatusException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling of anyResponseStatusException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleServerErrorException
(ServerErrorException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofServerErrorException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleServerWebInputException
(ServerWebInputException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofServerWebInputException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleUnsatisfiedRequestParameterException
(UnsatisfiedRequestParameterException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofUnsatisfiedRequestParameterException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleUnsupportedMediaTypeStatusException
(UnsupportedMediaTypeStatusException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofUnsupportedMediaTypeStatusException
.protected reactor.core.publisher.Mono<ResponseEntity<Object>>
ResponseEntityExceptionHandler.handleWebExchangeBindException
(WebExchangeBindException ex, HttpHeaders headers, HttpStatusCode status, ServerWebExchange exchange) Customize the handling ofWebExchangeBindException
. -
Uses of HttpHeaders in org.springframework.web.reactive.result.view
Methods in org.springframework.web.reactive.result.view that return HttpHeadersMethods in org.springframework.web.reactive.result.view with parameters of type HttpHeadersModifier and TypeMethodDescriptionRendering.Builder.headers
(HttpHeaders headers) Specify headers to add to the response. -
Uses of HttpHeaders in org.springframework.web.reactive.socket
Methods in org.springframework.web.reactive.socket that return HttpHeadersModifier and TypeMethodDescriptionHandshakeInfo.getHeaders()
Return the HTTP headers from the handshake request, either server request headers for a server session or the client response headers for a client session.Constructors in org.springframework.web.reactive.socket with parameters of type HttpHeadersModifierConstructorDescriptionHandshakeInfo
(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, reactor.core.publisher.Mono<Principal> principal, String protocol, InetSocketAddress remoteAddress, Map<String, Object> attributes, String logPrefix) Constructor targeting server-side use with extra information such as the cookies, remote address, attributes, and a log prefix.HandshakeInfo
(URI uri, HttpHeaders headers, reactor.core.publisher.Mono<Principal> principal, String protocol) Constructor with basic information about the handshake.HandshakeInfo
(URI uri, HttpHeaders headers, reactor.core.publisher.Mono<Principal> principal, String protocol, InetSocketAddress remoteAddress, Map<String, Object> attributes, String logPrefix) Deprecated. -
Uses of HttpHeaders in org.springframework.web.reactive.socket.client
Methods in org.springframework.web.reactive.socket.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
JettyWebSocketClient.execute
(URI url, HttpHeaders headers, WebSocketHandler handler) reactor.core.publisher.Mono<Void>
ReactorNetty2WebSocketClient.execute
(URI url, HttpHeaders requestHeaders, WebSocketHandler handler) reactor.core.publisher.Mono<Void>
ReactorNettyWebSocketClient.execute
(URI url, HttpHeaders requestHeaders, WebSocketHandler handler) reactor.core.publisher.Mono<Void>
StandardWebSocketClient.execute
(URI url, HttpHeaders headers, WebSocketHandler handler) reactor.core.publisher.Mono<Void>
UndertowWebSocketClient.execute
(URI url, HttpHeaders headers, WebSocketHandler handler) reactor.core.publisher.Mono<Void>
WebSocketClient.execute
(URI url, HttpHeaders headers, WebSocketHandler handler) A variant ofWebSocketClient.execute(URI, WebSocketHandler)
with custom headers. -
Uses of HttpHeaders in org.springframework.web.server
Methods in org.springframework.web.server that return HttpHeadersModifier and TypeMethodDescriptionMethodNotAllowedException.getHeaders()
Return HttpHeaders with an "Allow" header that documents the allowed HTTP methods for this URL, if available, or an empty instance otherwise.NotAcceptableStatusException.getHeaders()
Return HttpHeaders with an "Accept" header that documents the supported media types, if available, or an empty instance otherwise.ResponseStatusException.getHeaders()
Return headers to add to the error response, e.g.UnsupportedMediaTypeStatusException.getHeaders()
Return HttpHeaders with an "Accept" header that documents the supported media types, if available, or an empty instance otherwise.MethodNotAllowedException.getResponseHeaders()
Deprecated.as of 6.0 in favor ofMethodNotAllowedException.getHeaders()
NotAcceptableStatusException.getResponseHeaders()
Deprecated.as of 6.0 in favor ofNotAcceptableStatusException.getHeaders()
ResponseStatusException.getResponseHeaders()
Deprecated.as of 6.0 in favor ofResponseStatusException.getHeaders()
UnsupportedMediaTypeStatusException.getResponseHeaders()
Deprecated.as of 6.0 in favor ofUnsupportedMediaTypeStatusException.getHeaders()
-
Uses of HttpHeaders in org.springframework.web.service.invoker
Methods in org.springframework.web.service.invoker that return HttpHeadersModifier and TypeMethodDescriptionHttpRequestValues.getHeaders()
Return the headers for the request, if any.Methods in org.springframework.web.service.invoker that return types with arguments of type HttpHeadersModifier and TypeMethodDescriptionreactor.core.publisher.Mono<HttpHeaders>
HttpClientAdapter.requestToHeaders
(HttpRequestValues requestValues) Perform the given request, release the response content, and return the response headers. -
Uses of HttpHeaders in org.springframework.web.servlet
Methods in org.springframework.web.servlet that return HttpHeadersConstructors in org.springframework.web.servlet with parameters of type HttpHeadersModifierConstructorDescriptionNoHandlerFoundException
(String httpMethod, String requestURL, HttpHeaders headers) Constructor for NoHandlerFoundException. -
Uses of HttpHeaders in org.springframework.web.servlet.function
Methods in org.springframework.web.servlet.function that return HttpHeadersModifier and TypeMethodDescriptionServerRequest.Headers.asHttpHeaders()
Get the headers as an instance ofHttpHeaders
.ServerResponse.headers()
Return the headers of this response.Method parameters in org.springframework.web.servlet.function with type arguments of type HttpHeadersModifier and TypeMethodDescriptionEntityResponse.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.RenderingResponse.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.ServerRequest.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.ServerResponse.HeadersBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer. -
Uses of HttpHeaders in org.springframework.web.servlet.mvc.method.annotation
Methods in org.springframework.web.servlet.mvc.method.annotation with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected ResponseEntity<Object>
ResponseEntityExceptionHandler.createResponseEntity
(Object body, HttpHeaders headers, HttpStatusCode statusCode, WebRequest request) Create theResponseEntity
to use from the given body, headers, and statusCode.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleAsyncRequestTimeoutException
(AsyncRequestTimeoutException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofAsyncRequestTimeoutException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleBindException
(BindException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Deprecated, for removal: This API element is subject to removal in a future version.as of 6.0 sinceModelAttributeMethodProcessor
now raises theMethodArgumentNotValidException
subclass instead.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleConversionNotSupported
(ConversionNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofConversionNotSupportedException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleErrorResponseException
(ErrorResponseException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling of anyErrorResponseException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleExceptionInternal
(Exception ex, Object body, HttpHeaders headers, HttpStatusCode statusCode, WebRequest request) Internal handler method that all others in this class delegate to, for common handling, and for the creation of aResponseEntity
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleHttpMediaTypeNotAcceptable
(HttpMediaTypeNotAcceptableException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofHttpMediaTypeNotAcceptableException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleHttpMediaTypeNotSupported
(HttpMediaTypeNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofHttpMediaTypeNotSupportedException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleHttpMessageNotReadable
(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofHttpMessageNotReadableException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleHttpMessageNotWritable
(HttpMessageNotWritableException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofHttpMessageNotWritableException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleHttpRequestMethodNotSupported
(HttpRequestMethodNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofHttpRequestMethodNotSupportedException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleMethodArgumentNotValid
(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofMethodArgumentNotValidException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleMissingPathVariable
(MissingPathVariableException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofMissingPathVariableException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleMissingServletRequestParameter
(MissingServletRequestParameterException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofMissingServletRequestParameterException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleMissingServletRequestPart
(MissingServletRequestPartException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofMissingServletRequestPartException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleNoHandlerFoundException
(NoHandlerFoundException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofNoHandlerFoundException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleServletRequestBindingException
(ServletRequestBindingException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofServletRequestBindingException
.protected ResponseEntity<Object>
ResponseEntityExceptionHandler.handleTypeMismatch
(TypeMismatchException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) Customize the handling ofTypeMismatchException
. -
Uses of HttpHeaders in org.springframework.web.servlet.resource
Methods in org.springframework.web.servlet.resource that return HttpHeadersModifier and TypeMethodDescriptionHttpResource.getResponseHeaders()
The HTTP headers to be contributed to the HTTP response that serves the current resource. -
Uses of HttpHeaders in org.springframework.web.socket
Subclasses of HttpHeaders in org.springframework.web.socketModifier and TypeClassDescriptionclass
AnHttpHeaders
variant that adds support for the HTTP headers defined by the WebSocket specification RFC 6455.Methods in org.springframework.web.socket that return HttpHeadersModifier and TypeMethodDescriptionWebSocketSession.getHandshakeHeaders()
Return the headers used in the handshake request (nevernull
).Constructors in org.springframework.web.socket with parameters of type HttpHeadersModifierConstructorDescriptionWebSocketHttpHeaders
(HttpHeaders headers) Create an instance that wraps the given pre-existing HttpHeaders and also propagate all changes to it. -
Uses of HttpHeaders in org.springframework.web.socket.adapter.jetty
Methods in org.springframework.web.socket.adapter.jetty that return HttpHeaders -
Uses of HttpHeaders in org.springframework.web.socket.adapter.standard
Methods in org.springframework.web.socket.adapter.standard that return HttpHeadersConstructors in org.springframework.web.socket.adapter.standard with parameters of type HttpHeadersModifierConstructorDescriptionStandardWebSocketSession
(HttpHeaders headers, Map<String, Object> attributes, InetSocketAddress localAddress, InetSocketAddress remoteAddress) Constructor for a standard WebSocket session.StandardWebSocketSession
(HttpHeaders headers, Map<String, Object> attributes, InetSocketAddress localAddress, InetSocketAddress remoteAddress, Principal user) Constructor that associates a user with the WebSocket session. -
Uses of HttpHeaders in org.springframework.web.socket.client
Methods in org.springframework.web.socket.client that return HttpHeadersModifier and TypeMethodDescriptionWebSocketConnectionManager.getHeaders()
Return the default headers for the WebSocket handshake request.Methods in org.springframework.web.socket.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected ListenableFuture<WebSocketSession>
AbstractWebSocketClient.doHandshakeInternal
(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> subProtocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) Deprecated.as of 6.0, in favor ofAbstractWebSocketClient.executeInternal(WebSocketHandler, HttpHeaders, URI, List, List, Map)
protected abstract CompletableFuture<WebSocketSession>
AbstractWebSocketClient.executeInternal
(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> subProtocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) Perform the actual handshake to establish a connection to the server.void
WebSocketConnectionManager.setHeaders
(HttpHeaders headers) Provide default headers to add to the WebSocket handshake request. -
Uses of HttpHeaders in org.springframework.web.socket.client.jetty
Methods in org.springframework.web.socket.client.jetty with parameters of type HttpHeadersModifier and TypeMethodDescriptionJettyWebSocketClient.executeInternal
(WebSocketHandler wsHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) -
Uses of HttpHeaders in org.springframework.web.socket.client.standard
Methods in org.springframework.web.socket.client.standard with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected CompletableFuture<WebSocketSession>
StandardWebSocketClient.executeInternal
(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) -
Uses of HttpHeaders in org.springframework.web.socket.handler
Methods in org.springframework.web.socket.handler that return HttpHeaders -
Uses of HttpHeaders in org.springframework.web.socket.sockjs.client
Methods in org.springframework.web.socket.sockjs.client that return HttpHeadersModifier and TypeMethodDescriptionAbstractClientSockJsSession.getHandshakeHeaders()
TransportRequest.getHandshakeHeaders()
Return the headers to send with the connect request.XhrClientSockJsSession.getHeaders()
TransportRequest.getHttpRequestHeaders()
Return the headers to add to all other HTTP requests besides the handshake request such as XHR receive and send requests.Methods in org.springframework.web.socket.sockjs.client with parameters of type HttpHeadersModifier and TypeMethodDescriptionprotected abstract void
AbstractXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
AbstractXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) Deprecated.protected void
JettyXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI url, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
RestTemplateXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
UndertowXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) AbstractXhrTransport.executeInfoRequest
(URI infoUrl, HttpHeaders headers) InfoReceiver.executeInfoRequest
(URI infoUrl, HttpHeaders headers) Perform an HTTP request to the SockJS "Info" URL.protected abstract ResponseEntity<String>
AbstractXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
JettyXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
RestTemplateXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
UndertowXhrTransport.executeInfoRequestInternal
(URI infoUrl, HttpHeaders headers) protected ResponseEntity<String>
JettyXhrTransport.executeRequest
(URI url, org.eclipse.jetty.http.HttpMethod method, HttpHeaders headers, String body) protected ResponseEntity<String>
UndertowXhrTransport.executeRequest
(URI url, io.undertow.util.HttpString method, HttpHeaders headers, String body) void
AbstractXhrTransport.executeSendRequest
(URI url, HttpHeaders headers, TextMessage message) void
XhrTransport.executeSendRequest
(URI transportUrl, HttpHeaders headers, TextMessage message) Execute a request to send the message to the server.protected abstract ResponseEntity<String>
AbstractXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) JettyXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) RestTemplateXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) protected ResponseEntity<String>
UndertowXhrTransport.executeSendRequestInternal
(URI url, HttpHeaders headers, TextMessage message) -
Uses of HttpHeaders in org.springframework.web.socket.sockjs.transport.session
Methods in org.springframework.web.socket.sockjs.transport.session that return HttpHeadersModifier and TypeMethodDescriptionAbstractHttpSockJsSession.getHandshakeHeaders()
WebSocketServerSockJsSession.getHandshakeHeaders()
HandshakeInfo(URI, HttpHeaders, MultiValueMap, Mono, String, InetSocketAddress, Map, String)