类的使用
org.springframework.http.HttpHeaders
使用HttpHeaders的程序包 程序包 说明 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 includingClientHttpRequestandClientHttpResponseas well as aClientHttpConnector.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 aServerHttpRequestandServerHttpResponsealong with anHttpHandlerfor processing.org.springframework.mock.http Mock implementations of client/server-side HTTP abstractions.org.springframework.mock.http.client.reactive Mock implementations of reactive HTTP client contracts.org.springframework.mock.web A comprehensive set of Servlet API 4.0 mock objects, targeted at usage with Spring's Web MVC framework.org.springframework.mock.web.reactive.function.server Mock objects for the functional web framework.org.springframework.test.web.client.response Contains built-inResponseCreatorimplementations.org.springframework.test.web.reactive.server Support for testing Spring WebFlux server endpoints viaWebTestClient.org.springframework.test.web.servlet.request Contains built-inRequestBuilderimplementations.org.springframework.test.web.servlet.result Contains built-inResultMatcherandResultHandlerimplementations.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.reactive.function.client Provides a reactiveWebClientthat builds on top of theorg.springframework.http.client.reactivereactive HTTP adapter layer.org.springframework.web.reactive.function.client.support Classes supporting theorg.springframework.web.reactive.function.clientpackage.org.springframework.web.reactive.function.server Provides the types that make up Spring's functional web framework for Reactive environments.org.springframework.web.reactive.function.server.support Classes supporting theorg.springframework.web.reactive.function.serverpackage.org.springframework.web.reactive.resource Support classes for serving static resources.org.springframework.web.reactive.result.view Support for result handling through view resolution.org.springframework.web.reactive.socket Abstractions and support classes for reactive WebSocket interactions.org.springframework.web.reactive.socket.client Client support for WebSocket interactions.org.springframework.web.server Core interfaces and classes for Spring's generic, reactive web support.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.web.servlet.function Provides the types that make up Spring's functional web framework for Servlet environments.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.web.servlet.resource Support classes for serving static resources.org.springframework.web.socket Common abstractions and Spring configuration support for WebSocket applications.org.springframework.web.socket.adapter.jetty Adapter classes for the Jetty WebSocket API.org.springframework.web.socket.adapter.standard Adapter classes for the standard Java WebSocket API.org.springframework.web.socket.client Client-side abstractions for WebSocket applications.org.springframework.web.socket.client.jetty Client-side support for the Jetty WebSocket API.org.springframework.web.socket.client.standard Client-side classes for use with standard Java WebSocket endpoints.org.springframework.web.socket.handler ConvenientWebSocketHandlerimplementations and decorators.org.springframework.web.socket.sockjs.client SockJS client implementation ofWebSocketClient.org.springframework.web.socket.sockjs.transport.session SockJS specific implementations ofWebSocketSession.org.springframework.http中HttpHeaders的使用
声明为HttpHeaders的org.springframework.http中的字段 修饰符和类型 字段 说明 static HttpHeadersHttpHeaders. EMPTYAn emptyHttpHeadersinstance (immutable).返回HttpHeaders的org.springframework.http中的方法 修饰符和类型 方法 说明 HttpHeadersHttpEntity. getHeaders()Returns the headers of this entity.HttpHeadersHttpMessage. getHeaders()Return the headers of this message.static HttpHeadersHttpHeaders. readOnlyHttpHeaders(HttpHeaders headers)Apply a read-onlyHttpHeaderswrapper around the given headers, if necessary.static HttpHeadersHttpHeaders. writableHttpHeaders(HttpHeaders headers)Remove any read-only wrapper that may have been previously applied around the given headers viareadOnlyHttpHeaders(HttpHeaders).参数类型为HttpHeaders的org.springframework.http中的方法 修饰符和类型 方法 说明 BRequestEntity.HeadersBuilder. headers(HttpHeaders headers)Copy the given headers into the entity's headers map.BResponseEntity.HeadersBuilder. headers(HttpHeaders headers)Copy the given headers into the entity's headers map.static HttpHeadersHttpHeaders. readOnlyHttpHeaders(HttpHeaders headers)Apply a read-onlyHttpHeaderswrapper around the given headers, if necessary.static HttpHeadersHttpHeaders. writableHttpHeaders(HttpHeaders headers)Remove any read-only wrapper that may have been previously applied around the given headers viareadOnlyHttpHeaders(HttpHeaders).类型变量类型为HttpHeaders的org.springframework.http中的方法参数 修饰符和类型 方法 说明 BRequestEntity.HeadersBuilder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this entity's headers with the given consumer.BResponseEntity.HeadersBuilder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this entity's headers with the given consumer.org.springframework.http.client中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.client中的方法 修饰符和类型 方法 说明 HttpHeadersAbstractClientHttpRequest. getHeaders()参数类型为HttpHeaders的org.springframework.http.client中的方法 修饰符和类型 方法 说明 protected abstract ClientHttpResponseAbstractClientHttpRequest. executeInternal(HttpHeaders headers)Abstract template method that writes the given headers and content to the HTTP request.protected abstract OutputStreamAbstractClientHttpRequest. getBodyInternal(HttpHeaders headers)Abstract template method that returns the body.类型变量类型为HttpHeaders的org.springframework.http.client中的方法参数 修饰符和类型 方法 说明 MultipartBodyBuilder.PartBuilderMultipartBodyBuilder.PartBuilder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate the part headers through the given consumer.org.springframework.http.client.reactive中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpHeadersAbstractClientHttpRequest. getHeaders()HttpHeadersClientHttpRequestDecorator. getHeaders()HttpHeadersClientHttpResponseDecorator. getHeaders()参数类型为HttpHeaders的org.springframework.http.client.reactive中的构造器 构造器 说明 AbstractClientHttpRequest(HttpHeaders headers)org.springframework.http.client.support中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.client.support中的方法 修饰符和类型 方法 说明 HttpHeadersHttpRequestWrapper. getHeaders()Return the headers of the wrapped request.org.springframework.http.codec.multipart中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.codec.multipart中的方法 修饰符和类型 方法 说明 HttpHeadersPart. headers()Return the headers associated with the part.org.springframework.http.converter中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.http.converter中的方法 修饰符和类型 方法 说明 protected voidAbstractHttpMessageConverter. addDefaultHeaders(HttpHeaders headers, T t, MediaType contentType)Add default headers to the output message.protected voidStringHttpMessageConverter. addDefaultHeaders(HttpHeaders headers, String s, MediaType type)org.springframework.http.converter.json中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.converter.json中的方法 修饰符和类型 方法 说明 HttpHeadersMappingJacksonInputMessage. getHeaders()参数类型为HttpHeaders的org.springframework.http.converter.json中的构造器 构造器 说明 MappingJacksonInputMessage(InputStream body, HttpHeaders headers)MappingJacksonInputMessage(InputStream body, HttpHeaders headers, Class<?> deserializationView)org.springframework.http.converter.xml中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.http.converter.xml中的方法 修饰符和类型 方法 说明 protected abstract TAbstractXmlHttpMessageConverter. readFromSource(Class<? extends T> clazz, HttpHeaders headers, Source source)Abstract template method called fromAbstractHttpMessageConverter.read(Class, HttpInputMessage).protected TJaxb2CollectionHttpMessageConverter. readFromSource(Class<? extends T> clazz, HttpHeaders headers, Source source)protected ObjectJaxb2RootElementHttpMessageConverter. readFromSource(Class<?> clazz, HttpHeaders headers, Source source)protected ObjectMarshallingHttpMessageConverter. readFromSource(Class<?> clazz, HttpHeaders headers, Source source)protected abstract voidAbstractXmlHttpMessageConverter. writeToResult(T t, HttpHeaders headers, Result result)Abstract template method called fromAbstractXmlHttpMessageConverter.writeInternal(Object, HttpOutputMessage).protected voidJaxb2CollectionHttpMessageConverter. writeToResult(T t, HttpHeaders headers, Result result)protected voidJaxb2RootElementHttpMessageConverter. writeToResult(Object o, HttpHeaders headers, Result result)protected voidMarshallingHttpMessageConverter. writeToResult(Object o, HttpHeaders headers, Result result)org.springframework.http.server中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.server中的方法 修饰符和类型 方法 说明 HttpHeadersServletServerHttpRequest. getHeaders()HttpHeadersServletServerHttpResponse. getHeaders()org.springframework.http.server.reactive中HttpHeaders的使用
返回HttpHeaders的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 HttpHeadersAbstractServerHttpRequest. getHeaders()HttpHeadersAbstractServerHttpResponse. getHeaders()HttpHeadersServerHttpRequestDecorator. getHeaders()HttpHeadersServerHttpResponseDecorator. getHeaders()类型变量类型为HttpHeaders的org.springframework.http.server.reactive中的方法参数 修饰符和类型 方法 说明 ServerHttpRequest.BuilderServerHttpRequest.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate request headers.参数类型为HttpHeaders的org.springframework.http.server.reactive中的构造器 构造器 说明 AbstractListenerServerHttpResponse(DataBufferFactory dataBufferFactory, HttpHeaders headers)AbstractServerHttpRequest(URI uri, String contextPath, HttpHeaders headers)Constructor with the URI and headers for the request.AbstractServerHttpResponse(DataBufferFactory dataBufferFactory, HttpHeaders headers)org.springframework.mock.http中HttpHeaders的使用
返回HttpHeaders的org.springframework.mock.http中的方法 修饰符和类型 方法 说明 HttpHeadersMockHttpInputMessage. getHeaders()HttpHeadersMockHttpOutputMessage. getHeaders()Return the headers.org.springframework.mock.http.client.reactive中HttpHeaders的使用
返回HttpHeaders的org.springframework.mock.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpHeadersMockClientHttpResponse. getHeaders()org.springframework.mock.web中HttpHeaders的使用
返回HttpHeaders的org.springframework.mock.web中的方法 修饰符和类型 方法 说明 HttpHeadersMockPart. getHeaders()Return theHttpHeadersbacking header related accessor methods, allowing for populating selected header entries.HttpHeadersMockMultipartHttpServletRequest. getMultipartHeaders(String paramOrFileName)HttpHeadersMockMultipartHttpServletRequest. getRequestHeaders()org.springframework.mock.web.reactive.function.server中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.mock.web.reactive.function.server中的方法 修饰符和类型 方法 说明 MockServerRequest.BuilderMockServerRequest.Builder. headers(HttpHeaders headers)org.springframework.test.web.client.response中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.test.web.client.response中的方法 修饰符和类型 方法 说明 DefaultResponseCreatorDefaultResponseCreator. headers(HttpHeaders headers)Copy all given headers.org.springframework.test.web.reactive.server中HttpHeaders的使用
返回HttpHeaders的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 HttpHeadersExchangeResult. getRequestHeaders()Return the request headers sent to the server.HttpHeadersExchangeResult. getResponseHeaders()Return the response headers received from the server.类型变量类型为HttpHeaders的org.springframework.test.web.reactive.server中的方法参数 修饰符和类型 方法 说明 WebTestClient.BuilderWebTestClient.Builder. defaultHeaders(Consumer<HttpHeaders> headersConsumer)Manipulate the default headers with the given consumer.SWebTestClient.RequestHeadersSpec. headers(Consumer<HttpHeaders> headersConsumer)Manipulate the request's headers with the given consumer.org.springframework.test.web.servlet.request中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.test.web.servlet.request中的方法 修饰符和类型 方法 说明 MockHttpServletRequestBuilderMockHttpServletRequestBuilder. headers(HttpHeaders httpHeaders)Add all headers to the request.org.springframework.test.web.servlet.result中HttpHeaders的使用
返回HttpHeaders的org.springframework.test.web.servlet.result中的方法 修饰符和类型 方法 说明 protected HttpHeadersPrintingResultHandler. getRequestHeaders(MockHttpServletRequest request)protected HttpHeadersPrintingResultHandler. getResponseHeaders(MockHttpServletResponse response)org.springframework.web.client中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.client中的方法 修饰符和类型 方法 说明 HttpHeadersRestClientResponseException. getResponseHeaders()Return the HTTP response headers.HttpHeadersUnknownContentTypeException. getResponseHeaders()Return the HTTP response headers.HttpHeadersRestOperations. headForHeaders(String url, Object... uriVariables)Retrieve all headers of the resource specified by the URI template.HttpHeadersRestOperations. headForHeaders(String url, Map<String,?> uriVariables)Retrieve all headers of the resource specified by the URI template.HttpHeadersRestOperations. headForHeaders(URI url)Retrieve all headers of the resource specified by the URL.HttpHeadersRestTemplate. headForHeaders(String url, Object... uriVariables)HttpHeadersRestTemplate. headForHeaders(String url, Map<String,?> uriVariables)HttpHeadersRestTemplate. headForHeaders(URI url)返回变量类型为HttpHeaders的类型的org.springframework.web.client中的方法 修饰符和类型 方法 说明 protected ResponseExtractor<HttpHeaders>AsyncRestTemplate. headersExtractor()已过时。Returns a response extractor forHttpHeaders.protected ResponseExtractor<HttpHeaders>RestTemplate. headersExtractor()Return a response extractor forHttpHeaders.ListenableFuture<HttpHeaders>AsyncRestOperations. headForHeaders(String url, Object... uriVariables)已过时。Asynchronously retrieve all headers of the resource specified by the URI template.ListenableFuture<HttpHeaders>AsyncRestOperations. headForHeaders(String url, Map<String,?> uriVariables)已过时。Asynchronously retrieve all headers of the resource specified by the URI template.ListenableFuture<HttpHeaders>AsyncRestOperations. headForHeaders(URI url)已过时。Asynchronously retrieve all headers of the resource specified by the URL.ListenableFuture<HttpHeaders>AsyncRestTemplate. headForHeaders(String url, Object... uriVariables)已过时。ListenableFuture<HttpHeaders>AsyncRestTemplate. headForHeaders(String url, Map<String,?> uriVariables)已过时。ListenableFuture<HttpHeaders>AsyncRestTemplate. headForHeaders(URI url)已过时。参数类型为HttpHeaders的org.springframework.web.client中的方法 修饰符和类型 方法 说明 static HttpClientErrorExceptionHttpClientErrorException. create(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Variant ofHttpClientErrorException.create(HttpStatus, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpClientErrorExceptionHttpClientErrorException. create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)CreateHttpClientErrorExceptionor an HTTP status specific sub-class.static HttpServerErrorExceptionHttpServerErrorException. create(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Variant ofHttpServerErrorException.create(String, HttpStatus, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpServerErrorExceptionHttpServerErrorException. create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Create anHttpServerErrorExceptionor an HTTP status specific sub-class.参数类型为HttpHeaders的org.springframework.web.client中的构造器 构造器 说明 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 an prepared message.HttpClientErrorException(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset)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 an prepared message.HttpServerErrorException(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Constructor with a status code and status text, headers, and content.HttpStatusCodeException(String message, HttpStatus statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)Construct instance with anHttpStatus, status text, content, and a response charset.HttpStatusCodeException(HttpStatus statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)Construct instance with anHttpStatus, 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 ofHttpStatusCodeExceptionbased on anHttpStatus, status text, and response body content.UnknownHttpStatusCodeException(String message, int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)Construct a new instance ofHttpStatusCodeExceptionbased on anHttpStatus, status text, and response body content.org.springframework.web.multipart中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.multipart中的方法 修饰符和类型 方法 说明 HttpHeadersMultipartHttpServletRequest. getMultipartHeaders(String paramOrFileName)Return the headers associated with the specified part of the multipart request.HttpHeadersMultipartHttpServletRequest. getRequestHeaders()Return this request's headers as a convenient HttpHeaders instance.org.springframework.web.multipart.support中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.multipart.support中的方法 修饰符和类型 方法 说明 HttpHeadersRequestPartServletServerHttpRequest. getHeaders()HttpHeadersDefaultMultipartHttpServletRequest. getMultipartHeaders(String paramOrFileName)HttpHeadersStandardMultipartHttpServletRequest. getMultipartHeaders(String paramOrFileName)HttpHeadersAbstractMultipartHttpServletRequest. getRequestHeaders()org.springframework.web.reactive.function.client中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 HttpHeadersClientResponse.Headers. asHttpHeaders()Return the headers as anHttpHeadersinstance.HttpHeadersWebClientResponseException. getHeaders()Return the HTTP response headers.HttpHeadersClientRequest. headers()Return the headers of this request.参数类型为HttpHeaders的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 static WebClientResponseExceptionWebClientResponseException. create(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)CreateWebClientResponseExceptionor an HTTP status specific subclass.static WebClientResponseExceptionWebClientResponseException. create(int statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request)CreateWebClientResponseExceptionor an HTTP status specific subclass.类型变量类型为HttpHeaders的org.springframework.web.reactive.function.client中的方法参数 修饰符和类型 方法 说明 WebClient.BuilderWebClient.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.BuilderClientRequest.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this request's headers with the given consumer.ClientResponse.BuilderClientResponse.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this response's headers with the given consumer.SWebClient.RequestHeadersSpec. headers(Consumer<HttpHeaders> headersConsumer)Provides access to every header declared so far with the possibility to add, replace, or remove values.参数类型为HttpHeaders的org.springframework.web.reactive.function.client中的构造器 构造器 说明 UnknownHttpStatusCodeException(int statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset)Create a new instance of theUnknownHttpStatusCodeExceptionwith the given parameters.UnknownHttpStatusCodeException(int statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset, HttpRequest request)Create a new instance of theUnknownHttpStatusCodeExceptionwith the given parameters.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.org.springframework.web.reactive.function.client.support中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.function.client.support中的方法 修饰符和类型 方法 说明 HttpHeadersClientResponseWrapper.HeadersWrapper. asHttpHeaders()org.springframework.web.reactive.function.server中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 HttpHeadersServerRequest.Headers. asHttpHeaders()Get the headers as an instance ofHttpHeaders.HttpHeadersServerResponse. headers()Return the headers of this response.参数类型为HttpHeaders的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 EntityResponse.Builder<T>EntityResponse.Builder. headers(HttpHeaders headers)Copy the given headers into the entity's headers map.RenderingResponse.BuilderRenderingResponse.Builder. headers(HttpHeaders headers)Copy the given headers into the entity's headers map.类型变量类型为HttpHeaders的org.springframework.web.reactive.function.server中的方法参数 修饰符和类型 方法 说明 ServerRequest.BuilderServerRequest.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this request's headers with the given consumer.BServerResponse.HeadersBuilder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this response's headers with the given consumer.org.springframework.web.reactive.function.server.support中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.function.server.support中的方法 修饰符和类型 方法 说明 HttpHeadersServerRequestWrapper.HeadersWrapper. asHttpHeaders()org.springframework.web.reactive.resource中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.resource中的方法 修饰符和类型 方法 说明 HttpHeadersHttpResource. getResponseHeaders()The HTTP headers to be contributed to the HTTP response that serves the current resource.org.springframework.web.reactive.result.view中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.result.view中的方法 修饰符和类型 方法 说明 HttpHeadersRendering. headers()Return headers to add to the response.参数类型为HttpHeaders的org.springframework.web.reactive.result.view中的方法 修饰符和类型 方法 说明 BRendering.Builder. headers(HttpHeaders headers)Specify headers to add to the response.org.springframework.web.reactive.socket中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.reactive.socket中的方法 修饰符和类型 方法 说明 HttpHeadersHandshakeInfo. getHeaders()Return the handshake HTTP headers.参数类型为HttpHeaders的org.springframework.web.reactive.socket中的构造器 构造器 说明 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)Constructor targetting server-side use with extra information about the handshake, the remote address, and a pre-existing log prefix for correlation.org.springframework.web.reactive.socket.client中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.web.reactive.socket.client中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>JettyWebSocketClient. execute(URI url, HttpHeaders headers, 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.org.springframework.web.server中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.server中的方法 修饰符和类型 方法 说明 HttpHeadersMethodNotAllowedException. getResponseHeaders()Return HttpHeaders with an "Allow" header.HttpHeadersNotAcceptableStatusException. getResponseHeaders()Return HttpHeaders with an "Accept" header, or an empty instance.HttpHeadersResponseStatusException. getResponseHeaders()Return headers associated with the exception that should be added to the error response, e.g.org.springframework.web.servlet中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 HttpHeadersNoHandlerFoundException. getHeaders()参数类型为HttpHeaders的org.springframework.web.servlet中的构造器 构造器 说明 NoHandlerFoundException(String httpMethod, String requestURL, HttpHeaders headers)Constructor for NoHandlerFoundException.org.springframework.web.servlet.function中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 HttpHeadersServerRequest.Headers. asHttpHeaders()Get the headers as an instance ofHttpHeaders.HttpHeadersServerResponse. headers()Return the headers of this response.类型变量类型为HttpHeaders的org.springframework.web.servlet.function中的方法参数 修饰符和类型 方法 说明 EntityResponse.Builder<T>EntityResponse.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this response's headers with the given consumer.RenderingResponse.BuilderRenderingResponse.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this response's headers with the given consumer.ServerRequest.BuilderServerRequest.Builder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this request's headers with the given consumer.BServerResponse.HeadersBuilder. headers(Consumer<HttpHeaders> headersConsumer)Manipulate this response's headers with the given consumer.org.springframework.web.servlet.mvc.method.annotation中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleAsyncRequestTimeoutException(AsyncRequestTimeoutException ex, HttpHeaders headers, HttpStatus status, WebRequest webRequest)Customize the response for AsyncRequestTimeoutException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleBindException(BindException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for BindException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleConversionNotSupported(ConversionNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for ConversionNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatus status, WebRequest request)A single place to customize the response body of all exception types.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMediaTypeNotAcceptableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMediaTypeNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMessageNotReadableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMessageNotWritable(HttpMessageNotWritableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMessageNotWritableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpRequestMethodNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MethodArgumentNotValidException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingPathVariable(MissingPathVariableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingPathVariableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingServletRequestParameter(MissingServletRequestParameterException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingServletRequestParameterException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingServletRequestPart(MissingServletRequestPartException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingServletRequestPartException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleNoHandlerFoundException(NoHandlerFoundException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for NoHandlerFoundException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleServletRequestBindingException(ServletRequestBindingException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for ServletRequestBindingException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleTypeMismatch(TypeMismatchException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for TypeMismatchException.org.springframework.web.servlet.resource中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 HttpHeadersHttpResource. getResponseHeaders()The HTTP headers to be contributed to the HTTP response that serves the current resource.org.springframework.web.socket中HttpHeaders的使用
org.springframework.web.socket中HttpHeaders的子类 修饰符和类型 类 说明 classWebSocketHttpHeadersAnHttpHeadersvariant that adds support for the HTTP headers defined by the WebSocket specification RFC 6455.返回HttpHeaders的org.springframework.web.socket中的方法 修饰符和类型 方法 说明 HttpHeadersWebSocketSession. getHandshakeHeaders()Return the headers used in the handshake request (nevernull).参数类型为HttpHeaders的org.springframework.web.socket中的构造器 构造器 说明 WebSocketHttpHeaders(HttpHeaders headers)Create an instance that wraps the given pre-existing HttpHeaders and also propagate all changes to it.org.springframework.web.socket.adapter.jetty中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.adapter.jetty中的方法 修饰符和类型 方法 说明 HttpHeadersJettyWebSocketSession. getHandshakeHeaders()org.springframework.web.socket.adapter.standard中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.adapter.standard中的方法 修饰符和类型 方法 说明 HttpHeadersStandardWebSocketSession. getHandshakeHeaders()参数类型为HttpHeaders的org.springframework.web.socket.adapter.standard中的构造器 构造器 说明 StandardWebSocketSession(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.org.springframework.web.socket.client中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.client中的方法 修饰符和类型 方法 说明 HttpHeadersWebSocketConnectionManager. getHeaders()Return the default headers for the WebSocket handshake request.参数类型为HttpHeaders的org.springframework.web.socket.client中的方法 修饰符和类型 方法 说明 protected abstract ListenableFuture<WebSocketSession>AbstractWebSocketClient. doHandshakeInternal(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.voidWebSocketConnectionManager. setHeaders(HttpHeaders headers)Provide default headers to add to the WebSocket handshake request.org.springframework.web.socket.client.jetty中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.web.socket.client.jetty中的方法 修饰符和类型 方法 说明 ListenableFuture<WebSocketSession>JettyWebSocketClient. doHandshakeInternal(WebSocketHandler wsHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String,Object> attributes)org.springframework.web.socket.client.standard中HttpHeaders的使用
参数类型为HttpHeaders的org.springframework.web.socket.client.standard中的方法 修饰符和类型 方法 说明 protected ListenableFuture<WebSocketSession>StandardWebSocketClient. doHandshakeInternal(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String,Object> attributes)org.springframework.web.socket.handler中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.handler中的方法 修饰符和类型 方法 说明 HttpHeadersWebSocketSessionDecorator. getHandshakeHeaders()org.springframework.web.socket.sockjs.client中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.sockjs.client中的方法 修饰符和类型 方法 说明 HttpHeadersAbstractClientSockJsSession. getHandshakeHeaders()HttpHeadersTransportRequest. getHandshakeHeaders()Return the headers to send with the connect request.HttpHeadersXhrClientSockJsSession. getHeaders()HttpHeadersTransportRequest. getHttpRequestHeaders()Return the headers to add to all other HTTP requests besides the handshake request such as XHR receive and send requests.参数类型为HttpHeaders的org.springframework.web.socket.sockjs.client中的方法 修饰符和类型 方法 说明 protected abstract voidAbstractXhrTransport. connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture)protected voidJettyXhrTransport. connectInternal(TransportRequest transportRequest, WebSocketHandler handler, URI url, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture)protected voidRestTemplateXhrTransport. connectInternal(TransportRequest transportRequest, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture)protected voidUndertowXhrTransport. connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture)StringAbstractXhrTransport. executeInfoRequest(URI infoUrl, HttpHeaders headers)StringInfoReceiver. 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)voidAbstractXhrTransport. executeSendRequest(URI url, HttpHeaders headers, TextMessage message)voidXhrTransport. 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)ResponseEntity<String>JettyXhrTransport. executeSendRequestInternal(URI url, HttpHeaders headers, TextMessage message)ResponseEntity<String>RestTemplateXhrTransport. executeSendRequestInternal(URI url, HttpHeaders headers, TextMessage message)protected ResponseEntity<String>UndertowXhrTransport. executeSendRequestInternal(URI url, HttpHeaders headers, TextMessage message)org.springframework.web.socket.sockjs.transport.session中HttpHeaders的使用
返回HttpHeaders的org.springframework.web.socket.sockjs.transport.session中的方法 修饰符和类型 方法 说明 HttpHeadersAbstractHttpSockJsSession. getHandshakeHeaders()HttpHeadersWebSocketServerSockJsSession. getHandshakeHeaders()