Uses of Class
org.springframework.http.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.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.
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.-
Uses of HttpHeaders in org.springframework.http
Modifier and TypeFieldDescriptionstatic final HttpHeaders
HttpHeaders.EMPTY
An emptyHttpHeaders
instance (immutable).Modifier 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
(org.springframework.util.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)
.Modifier 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)
.Modifier 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
Modifier 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.Modifier and TypeMethodDescriptionMultipartBodyBuilder.PartBuilder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate the part headers through the given consumer. -
Uses of HttpHeaders in org.springframework.http.client.reactive
Modifier and TypeMethodDescriptionAbstractClientHttpRequest.getHeaders()
ClientHttpRequestDecorator.getHeaders()
ClientHttpResponseDecorator.getHeaders()
protected HttpHeaders
AbstractClientHttpRequest.initReadOnlyHeaders()
Initialize the read-only headers after the request is committed. -
Uses of HttpHeaders in org.springframework.http.client.support
Modifier and TypeMethodDescriptionHttpRequestWrapper.getHeaders()
Return the headers of the wrapped request. -
Uses of HttpHeaders in org.springframework.http.codec.multipart
Modifier and TypeMethodDescriptionPart.headers()
Return the headers associated with the part.PartEvent.headers()
Return the headers of the part that this event belongs to.Modifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<org.springframework.core.io.buffer.DataBuffer>
MultipartWriterSupport.generatePartHeaders
(HttpHeaders headers, org.springframework.core.io.buffer.DataBufferFactory bufferFactory) Modifier and TypeMethodDescriptionstatic reactor.core.publisher.Flux<FilePartEvent>
FilePartEvent.create
(String partName, String filename, MediaType contentType, reactor.core.publisher.Flux<org.springframework.core.io.buffer.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, org.springframework.core.io.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
Modifier 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
ModifierConstructorDescriptionMappingJacksonInputMessage
(InputStream body, HttpHeaders headers) MappingJacksonInputMessage
(InputStream body, HttpHeaders headers, Class<?> deserializationView) -
Uses of HttpHeaders in org.springframework.http.converter.xml
Modifier 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
Modifier and TypeMethodDescriptionDelegatingServerHttpResponse.getHeaders()
ServletServerHttpRequest.getHeaders()
ServletServerHttpResponse.getHeaders()
-
Uses of HttpHeaders in org.springframework.http.server.reactive
Modifier and TypeMethodDescriptionAbstractServerHttpRequest.getHeaders()
AbstractServerHttpResponse.getHeaders()
ServerHttpRequestDecorator.getHeaders()
ServerHttpResponseDecorator.getHeaders()
Modifier and TypeMethodDescriptionServerHttpRequest.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate request headers.ModifierConstructorDescriptionAbstractListenerServerHttpResponse
(org.springframework.core.io.buffer.DataBufferFactory bufferFactory, HttpHeaders headers) AbstractServerHttpRequest
(URI uri, String contextPath, HttpHeaders headers) Deprecated, for removal: This API element is subject to removal in a future version.AbstractServerHttpResponse
(org.springframework.core.io.buffer.DataBufferFactory dataBufferFactory, HttpHeaders headers) -
Uses of HttpHeaders in org.springframework.web
Modifier and TypeMethodDescriptiondefault HttpHeaders
ErrorResponse.getHeaders()
Return headers to use for the response.ErrorResponseException.getHeaders()
HttpMediaTypeNotAcceptableException.getHeaders()
HttpMediaTypeNotSupportedException.getHeaders()
HttpRequestMethodNotSupportedException.getHeaders()
Modifier and TypeMethodDescriptionErrorResponse.Builder.headers
(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer. -
Uses of HttpHeaders in org.springframework.web.client
Modifier 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) Modifier and TypeMethodDescriptionprotected ResponseExtractor<HttpHeaders>
RestTemplate.headersExtractor()
Return a response extractor forHttpHeaders
.Modifier 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.ModifierConstructorDescriptionHttpClientErrorException
(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
Modifier 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
Modifier and TypeMethodDescriptionRequestPartServletServerHttpRequest.getHeaders()
DefaultMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) StandardMultipartHttpServletRequest.getMultipartHeaders
(String paramOrFileName) AbstractMultipartHttpServletRequest.getRequestHeaders()
-
Uses of HttpHeaders in org.springframework.web.server
Modifier 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
Modifier and TypeMethodDescriptionHttpRequestValues.getHeaders()
Return the headers for the request, if any.Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<HttpHeaders>
HttpClientAdapter.requestToHeaders
(HttpRequestValues requestValues) Perform the given request, release the response content, and return the response headers.
AbstractServerHttpRequest(HttpMethod, URI, String, MultiValueMap)