Package | Description |
---|---|
org.springframework.http |
Contains a basic abstraction over client/server-side HTTP.
|
org.springframework.http.client |
Contains an abstraction over client-side HTTP.
|
org.springframework.http.client.reactive |
Abstractions for reactive HTTP client support including
ClientHttpRequest and
ClientHttpResponse as well as a
ClientHttpConnector . |
org.springframework.http.client.support |
This package provides generic HTTP support classes,
to be used by higher-level classes like RestTemplate.
|
org.springframework.http.codec.multipart |
Multipart support.
|
org.springframework.http.converter |
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
|
org.springframework.http.converter.json |
Provides HttpMessageConverter implementations for handling JSON.
|
org.springframework.http.converter.xml |
Provides HttpMessageConverter implementations for handling XML.
|
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 |
Multipart resolution framework for handling file uploads.
|
org.springframework.web.multipart.support |
Support classes for the multipart resolution framework.
|
org.springframework.web.server |
Core interfaces and classes for Spring's generic, reactive web support.
|
Modifier and Type | Field and Description |
---|---|
static HttpHeaders |
HttpHeaders.EMPTY
An empty
HttpHeaders instance (immutable). |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpMessage.getHeaders()
Return the headers of this message.
|
HttpHeaders |
HttpEntity.getHeaders()
Returns the headers of this entity.
|
static HttpHeaders |
HttpHeaders.readOnlyHttpHeaders(HttpHeaders headers)
Apply a read-only
HttpHeaders wrapper around the given headers, if necessary. |
static HttpHeaders |
HttpHeaders.readOnlyHttpHeaders(org.springframework.util.MultiValueMap<String,String> headers)
Apply a read-only
HttpHeaders 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 via
readOnlyHttpHeaders(HttpHeaders) . |
Modifier and Type | Method and Description |
---|---|
B |
ResponseEntity.HeadersBuilder.headers(HttpHeaders headers)
Copy the given headers into the entity's headers map.
|
B |
RequestEntity.HeadersBuilder.headers(HttpHeaders headers)
Copy the given headers into the entity's headers map.
|
static HttpHeaders |
HttpHeaders.readOnlyHttpHeaders(HttpHeaders headers)
Apply a read-only
HttpHeaders 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 via
readOnlyHttpHeaders(HttpHeaders) . |
Modifier and Type | Method and Description |
---|---|
B |
ResponseEntity.HeadersBuilder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate this entity's headers with the given consumer.
|
B |
RequestEntity.HeadersBuilder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate this entity's headers with the given consumer.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
AbstractClientHttpRequest.getHeaders() |
Modifier and Type | Method and Description |
---|---|
protected 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 Type | Method and Description |
---|---|
MultipartBodyBuilder.PartBuilder |
MultipartBodyBuilder.PartBuilder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate the part headers through the given consumer.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
ClientHttpResponseDecorator.getHeaders() |
HttpHeaders |
ClientHttpRequestDecorator.getHeaders() |
HttpHeaders |
AbstractClientHttpRequest.getHeaders() |
protected HttpHeaders |
AbstractClientHttpRequest.initReadOnlyHeaders()
Initialize the read-only headers after the request is committed.
|
Constructor and Description |
---|
AbstractClientHttpRequest(HttpHeaders headers) |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpRequestWrapper.getHeaders()
Return the headers of the wrapped request.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
Part.headers()
Return the headers associated with the part.
|
Modifier and Type | Method and Description |
---|---|
protected reactor.core.publisher.Mono<org.springframework.core.io.buffer.DataBuffer> |
MultipartWriterSupport.generatePartHeaders(HttpHeaders headers,
org.springframework.core.io.buffer.DataBufferFactory bufferFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
StringHttpMessageConverter.addDefaultHeaders(HttpHeaders headers,
String s,
MediaType type) |
protected void |
AbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders headers,
T t,
MediaType contentType)
Add default headers to the output message.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
MappingJacksonInputMessage.getHeaders() |
Constructor and Description |
---|
MappingJacksonInputMessage(InputStream body,
HttpHeaders headers) |
MappingJacksonInputMessage(InputStream body,
HttpHeaders headers,
Class<?> deserializationView) |
Modifier and Type | Method and Description |
---|---|
protected Object |
MarshallingHttpMessageConverter.readFromSource(Class<?> clazz,
HttpHeaders headers,
Source source) |
protected Object |
Jaxb2RootElementHttpMessageConverter.readFromSource(Class<?> clazz,
HttpHeaders headers,
Source source) |
protected T |
Jaxb2CollectionHttpMessageConverter.readFromSource(Class<? extends T> clazz,
HttpHeaders headers,
Source source) |
protected abstract T |
AbstractXmlHttpMessageConverter.readFromSource(Class<? extends T> clazz,
HttpHeaders headers,
Source source)
Abstract template method called from
AbstractHttpMessageConverter.read(Class, HttpInputMessage) . |
protected void |
MarshallingHttpMessageConverter.writeToResult(Object o,
HttpHeaders headers,
Result result) |
protected void |
Jaxb2RootElementHttpMessageConverter.writeToResult(Object o,
HttpHeaders headers,
Result result) |
protected void |
Jaxb2CollectionHttpMessageConverter.writeToResult(T t,
HttpHeaders headers,
Result result) |
protected abstract void |
AbstractXmlHttpMessageConverter.writeToResult(T t,
HttpHeaders headers,
Result result)
Abstract template method called from
AbstractXmlHttpMessageConverter.writeInternal(Object, HttpOutputMessage) . |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
ServletServerHttpResponse.getHeaders() |
HttpHeaders |
ServletServerHttpRequest.getHeaders() |
HttpHeaders |
DelegatingServerHttpResponse.getHeaders() |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
AbstractServerHttpResponse.getHeaders() |
HttpHeaders |
ServerHttpRequestDecorator.getHeaders() |
HttpHeaders |
AbstractServerHttpRequest.getHeaders() |
HttpHeaders |
ServerHttpResponseDecorator.getHeaders() |
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest.Builder |
ServerHttpRequest.Builder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate request headers.
|
Constructor and Description |
---|
AbstractListenerServerHttpResponse(org.springframework.core.io.buffer.DataBufferFactory bufferFactory,
HttpHeaders headers) |
AbstractServerHttpRequest(URI uri,
String contextPath,
HttpHeaders headers)
Constructor with the URI and headers for the request.
|
AbstractServerHttpResponse(org.springframework.core.io.buffer.DataBufferFactory dataBufferFactory,
HttpHeaders headers) |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
UnknownContentTypeException.getResponseHeaders()
Return the HTTP response headers.
|
HttpHeaders |
RestClientResponseException.getResponseHeaders()
Return the HTTP response headers.
|
HttpHeaders |
RestOperations.headForHeaders(String url,
Map<String,?> uriVariables)
Retrieve all headers of the resource specified by the URI template.
|
HttpHeaders |
RestTemplate.headForHeaders(String url,
Map<String,?> uriVariables) |
HttpHeaders |
RestOperations.headForHeaders(String url,
Object... uriVariables)
Retrieve all headers of the resource specified by the URI template.
|
HttpHeaders |
RestTemplate.headForHeaders(String url,
Object... uriVariables) |
HttpHeaders |
RestOperations.headForHeaders(URI url)
Retrieve all headers of the resource specified by the URL.
|
HttpHeaders |
RestTemplate.headForHeaders(URI url) |
Modifier and Type | Method and Description |
---|---|
protected ResponseExtractor<HttpHeaders> |
RestTemplate.headersExtractor()
Return a response extractor for
HttpHeaders . |
protected ResponseExtractor<HttpHeaders> |
AsyncRestTemplate.headersExtractor()
Deprecated.
Returns a response extractor for
HttpHeaders . |
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestOperations.headForHeaders(String url,
Map<String,?> uriVariables)
Deprecated.
Asynchronously retrieve all headers of the resource specified by the URI template.
|
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestTemplate.headForHeaders(String url,
Map<String,?> uriVariables)
Deprecated.
|
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestOperations.headForHeaders(String url,
Object... uriVariables)
Deprecated.
Asynchronously retrieve all headers of the resource specified by the URI template.
|
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestTemplate.headForHeaders(String url,
Object... uriVariables)
Deprecated.
|
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestOperations.headForHeaders(URI url)
Deprecated.
Asynchronously retrieve all headers of the resource specified by the URL.
|
org.springframework.util.concurrent.ListenableFuture<HttpHeaders> |
AsyncRestTemplate.headForHeaders(URI url)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static HttpClientErrorException |
HttpClientErrorException.create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create
HttpClientErrorException or an HTTP status specific subclass. |
static HttpServerErrorException |
HttpServerErrorException.create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create an
HttpServerErrorException or an HTTP status specific subclass. |
static HttpClientErrorException |
HttpClientErrorException.create(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Variant of
HttpClientErrorException.create(HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message. |
static HttpServerErrorException |
HttpServerErrorException.create(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Variant of
HttpServerErrorException.create(String, HttpStatus, String, HttpHeaders, byte[], Charset)
with an optional prepared message. |
Constructor and Description |
---|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content.
|
HttpClientErrorException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content,
and a prepared message.
|
HttpServerErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Constructor with a status code and status text, headers, and content.
|
HttpServerErrorException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Constructor with a status code and status text, headers, content, and a
prepared message.
|
HttpStatusCodeException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct instance with an
HttpStatus , status text, content, and
a response charset. |
HttpStatusCodeException(String message,
HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct instance with an
HttpStatus , status text, content, and
a response charset. |
RestClientResponseException(String message,
int statusCode,
String statusText,
HttpHeaders responseHeaders,
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.
|
UnknownHttpStatusCodeException(int rawStatusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus , status text, and response body content. |
UnknownHttpStatusCodeException(String message,
int rawStatusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpStatusCodeException based on an
HttpStatus , status text, and response body content. |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
MultipartHttpServletRequest.getMultipartHeaders(String paramOrFileName)
Return the headers for the specified part of the multipart request.
|
HttpHeaders |
MultipartHttpServletRequest.getRequestHeaders()
Return this request's headers as a convenient HttpHeaders instance.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
RequestPartServletServerHttpRequest.getHeaders() |
HttpHeaders |
StandardMultipartHttpServletRequest.getMultipartHeaders(String paramOrFileName) |
HttpHeaders |
DefaultMultipartHttpServletRequest.getMultipartHeaders(String paramOrFileName) |
HttpHeaders |
AbstractMultipartHttpServletRequest.getRequestHeaders() |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
NotAcceptableStatusException.getResponseHeaders()
Return HttpHeaders with an "Accept" header, or an empty instance.
|
HttpHeaders |
ResponseStatusException.getResponseHeaders()
Return headers associated with the exception that should be added to the
error response, e.g.
|
HttpHeaders |
MethodNotAllowedException.getResponseHeaders()
Return HttpHeaders with an "Allow" header.
|
HttpHeaders |
UnsupportedMediaTypeStatusException.getResponseHeaders() |