类的使用
org.springframework.http.HttpMethod
使用HttpMethod的程序包 程序包 说明 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 includingClientHttpRequest
andClientHttpResponse
as 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.server Contains an abstraction over server-side HTTP.org.springframework.http.server.reactive Abstractions for reactive HTTP server support including aServerHttpRequest
andServerHttpResponse
along with anHttpHandler
for processing.org.springframework.mock.http.client Mock implementations of client-side HTTP abstractions.org.springframework.mock.http.client.reactive Mock implementations of reactive HTTP client contracts.org.springframework.mock.http.server.reactive Mock implementations of reactive HTTP server 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 Contains client-side REST testing support.org.springframework.test.web.client.match Contains built-inRequestMatcher
implementations.org.springframework.test.web.reactive.server Support for testing Spring WebFlux server endpoints viaWebTestClient
.org.springframework.test.web.servlet.request Contains built-inRequestBuilder
implementations.org.springframework.web Common, generic interfaces that define minimal boundary points between Spring's web infrastructure and other framework modules.org.springframework.web.client Core package of the client-side web support.org.springframework.web.context.request Support for generic request context holding, in particular for scoping of application objects per HTTP request or HTTP session.org.springframework.web.cors Support for CORS (Cross-Origin Resource Sharing), based on a commonCorsProcessor
strategy.org.springframework.web.cors.reactive Reactive support for CORS (Cross-Origin Resource Sharing), based on a commonCorsProcessor
strategy.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 reactiveWebClient
that builds on top of theorg.springframework.http.client.reactive
reactive HTTP adapter layer.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.server
package.org.springframework.web.server Core interfaces and classes for Spring's generic, reactive web support.org.springframework.web.servlet.function Provides the types that make up Spring's functional web framework for Servlet environments.org.springframework.web.socket.sockjs.support Support classes for SockJS including anAbstractSockJsService
implementation.org.springframework.web.socket.sockjs.transport Server-side support for SockJS transports includingTransportHandler
implementations for processing incoming requests, theirsession
counterparts for sending messages over the various transports, andDefaultSockJsService
.org.springframework.http中HttpMethod的使用
返回HttpMethod的org.springframework.http中的方法 修饰符和类型 方法 说明 HttpMethod
HttpHeaders. getAccessControlRequestMethod()
Return the value of theAccess-Control-Request-Method
request header.default HttpMethod
HttpRequest. getMethod()
Return the HTTP method of the request.HttpMethod
RequestEntity. getMethod()
Return the HTTP method of the request.static HttpMethod
HttpMethod. resolve(String method)
Resolve the given method value to anHttpMethod
.static HttpMethod
HttpMethod. valueOf(String name)
返回带有指定名称的该类型的枚举常量。static HttpMethod[]
HttpMethod. values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。返回变量类型为HttpMethod的类型的org.springframework.http中的方法 修饰符和类型 方法 说明 List<HttpMethod>
HttpHeaders. getAccessControlAllowMethods()
Return the value of theAccess-Control-Allow-Methods
response header.Set<HttpMethod>
HttpHeaders. getAllow()
Return the set of allowedHTTP methods
, as specified by theAllow
header.参数类型为HttpMethod的org.springframework.http中的方法 修饰符和类型 方法 说明 B
ResponseEntity.HeadersBuilder. allow(HttpMethod... allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.static RequestEntity.BodyBuilder
RequestEntity. method(HttpMethod method, URI url)
Create a builder with the given method and url.void
HttpHeaders. setAccessControlRequestMethod(HttpMethod requestMethod)
Set the (new) value of theAccess-Control-Request-Method
request header.类型变量类型为HttpMethod的org.springframework.http中的方法参数 修饰符和类型 方法 说明 void
HttpHeaders. setAccessControlAllowMethods(List<HttpMethod> allowedMethods)
Set the (new) value of theAccess-Control-Allow-Methods
response header.void
HttpHeaders. setAllow(Set<HttpMethod> allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.参数类型为HttpMethod的org.springframework.http中的构造器 构造器 说明 RequestEntity(HttpMethod method, URI url)
Constructor with method and URL but without body nor headers.RequestEntity(MultiValueMap<String,String> headers, HttpMethod method, URI url)
Constructor with method, URL and headers but without body.RequestEntity(T body, HttpMethod method, URI url)
Constructor with method, URL and body but without headers.RequestEntity(T body, HttpMethod method, URI url, Type type)
Constructor with method, URL, body and type but without headers.RequestEntity(T body, MultiValueMap<String,String> headers, HttpMethod method, URI url)
Constructor with method, URL, headers and body.RequestEntity(T body, MultiValueMap<String,String> headers, HttpMethod method, URI url, Type type)
Constructor with method, URL, headers, body and type.org.springframework.http.client中HttpMethod的使用
参数类型为HttpMethod的org.springframework.http.client中的方法 修饰符和类型 方法 说明 AsyncClientHttpRequest
AsyncClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod httpMethod)
已过时。Create a new asynchronousAsyncClientHttpRequest
for the specified URI and HTTP method.AsyncClientHttpRequest
HttpComponentsAsyncClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod httpMethod)
已过时。AsyncClientHttpRequest
InterceptingAsyncClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod method)
已过时。AsyncClientHttpRequest
Netty4ClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod httpMethod)
已过时。AsyncClientHttpRequest
OkHttp3ClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod httpMethod)
AsyncClientHttpRequest
SimpleClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod httpMethod)
Create a new asynchronousAsyncClientHttpRequest
for the specified URI and HTTP method.protected org.apache.http.protocol.HttpContext
HttpComponentsClientHttpRequestFactory. createHttpContext(HttpMethod httpMethod, URI uri)
Template methods that creates aHttpContext
for the given HTTP method and URI.protected HttpUriRequest
HttpComponentsClientHttpRequestFactory. createHttpUriRequest(HttpMethod httpMethod, URI uri)
Create a Commons HttpMethodBase object for the given HTTP method and URI specification.ClientHttpRequest
AbstractClientHttpRequestFactoryWrapper. createRequest(URI uri, HttpMethod httpMethod)
This implementation simply callsAbstractClientHttpRequestFactoryWrapper.createRequest(URI, HttpMethod, ClientHttpRequestFactory)
with the wrapped request factory provided to the constructor.protected abstract ClientHttpRequest
AbstractClientHttpRequestFactoryWrapper. createRequest(URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
Create a newClientHttpRequest
for the specified URI and HTTP method by using the passed-on request factory.protected ClientHttpRequest
BufferingClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
ClientHttpRequest
ClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
Create a newClientHttpRequest
for the specified URI and HTTP method.ClientHttpRequest
HttpComponentsClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
protected ClientHttpRequest
InterceptingClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
ClientHttpRequest
Netty4ClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
已过时。ClientHttpRequest
OkHttp3ClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
ClientHttpRequest
SimpleClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
protected boolean
BufferingClientHttpRequestFactory. shouldBuffer(URI uri, HttpMethod httpMethod)
Indicates whether the request/response exchange for the given URI and method should be buffered in memory.类型变量类型为HttpMethod的org.springframework.http.client中的方法参数 修饰符和类型 方法 说明 void
HttpComponentsClientHttpRequestFactory. setHttpContextFactory(BiFunction<HttpMethod,URI,org.apache.http.protocol.HttpContext> httpContextFactory)
Configure a factory to pre-create theHttpContext
for each request.org.springframework.http.client.reactive中HttpMethod的使用
返回HttpMethod的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpMethod
ClientHttpRequest. getMethod()
Return the HTTP method of the request.HttpMethod
ClientHttpRequestDecorator. getMethod()
参数类型为HttpMethod的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<ClientHttpResponse>
ClientHttpConnector. connect(HttpMethod method, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)
Connect to the origin server using the givenHttpMethod
andURI
and apply the givenrequestCallback
when the HTTP request of the underlying API can be initialized and written to.reactor.core.publisher.Mono<ClientHttpResponse>
JettyClientHttpConnector. connect(HttpMethod method, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)
reactor.core.publisher.Mono<ClientHttpResponse>
ReactorClientHttpConnector. connect(HttpMethod method, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)
org.springframework.http.client.support中HttpMethod的使用
返回HttpMethod的org.springframework.http.client.support中的方法 修饰符和类型 方法 说明 HttpMethod
HttpRequestWrapper. getMethod()
Return the method of the wrapped request.参数类型为HttpMethod的org.springframework.http.client.support中的方法 修饰符和类型 方法 说明 protected AsyncClientHttpRequest
AsyncHttpAccessor. createAsyncRequest(URI url, HttpMethod method)
已过时。Create a newAsyncClientHttpRequest
via this template'sAsyncClientHttpRequestFactory
.protected ClientHttpRequest
HttpAccessor. createRequest(URI url, HttpMethod method)
Create a newClientHttpRequest
via this template'sClientHttpRequestFactory
.org.springframework.http.server中HttpMethod的使用
返回HttpMethod的org.springframework.http.server中的方法 修饰符和类型 方法 说明 HttpMethod
ServletServerHttpRequest. getMethod()
org.springframework.http.server.reactive中HttpMethod的使用
返回HttpMethod的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 HttpMethod
ServerHttpRequestDecorator. getMethod()
参数类型为HttpMethod的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 ServerHttpRequest.Builder
ServerHttpRequest.Builder. method(HttpMethod httpMethod)
Set the HTTP method to return.org.springframework.mock.http.client中HttpMethod的使用
返回HttpMethod的org.springframework.mock.http.client中的方法 修饰符和类型 方法 说明 HttpMethod
MockClientHttpRequest. getMethod()
参数类型为HttpMethod的org.springframework.mock.http.client中的方法 修饰符和类型 方法 说明 void
MockClientHttpRequest. setMethod(HttpMethod httpMethod)
参数类型为HttpMethod的org.springframework.mock.http.client中的构造器 构造器 说明 MockAsyncClientHttpRequest(HttpMethod httpMethod, URI uri)
已过时。MockClientHttpRequest(HttpMethod httpMethod, URI uri)
Create an instance with the given HttpMethod and URI.org.springframework.mock.http.client.reactive中HttpMethod的使用
返回HttpMethod的org.springframework.mock.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpMethod
MockClientHttpRequest. getMethod()
参数类型为HttpMethod的org.springframework.mock.http.client.reactive中的构造器 构造器 说明 MockClientHttpRequest(HttpMethod httpMethod, String urlTemplate, Object... vars)
MockClientHttpRequest(HttpMethod httpMethod, URI url)
org.springframework.mock.http.server.reactive中HttpMethod的使用
返回HttpMethod的org.springframework.mock.http.server.reactive中的方法 修饰符和类型 方法 说明 HttpMethod
MockServerHttpRequest. getMethod()
参数类型为HttpMethod的org.springframework.mock.http.server.reactive中的方法 修饰符和类型 方法 说明 static MockServerHttpRequest.BodyBuilder
MockServerHttpRequest. method(HttpMethod method, String urlTemplate, Object... vars)
Alternative toMockServerHttpRequest.method(HttpMethod, URI)
that accepts a URI template.static MockServerHttpRequest.BodyBuilder
MockServerHttpRequest. method(HttpMethod method, URI url)
Create a builder with the given HTTP method and aURI
.org.springframework.mock.web中HttpMethod的使用
返回HttpMethod的org.springframework.mock.web中的方法 修饰符和类型 方法 说明 HttpMethod
MockMultipartHttpServletRequest. getRequestMethod()
org.springframework.mock.web.reactive.function.server中HttpMethod的使用
返回HttpMethod的org.springframework.mock.web.reactive.function.server中的方法 修饰符和类型 方法 说明 HttpMethod
MockServerRequest. method()
参数类型为HttpMethod的org.springframework.mock.web.reactive.function.server中的方法 修饰符和类型 方法 说明 MockServerRequest.Builder
MockServerRequest.Builder. method(HttpMethod method)
org.springframework.test.web.client中HttpMethod的使用
参数类型为HttpMethod的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 AsyncClientHttpRequest
MockMvcClientHttpRequestFactory. createAsyncRequest(URI uri, HttpMethod method)
ClientHttpRequest
MockMvcClientHttpRequestFactory. createRequest(URI uri, HttpMethod httpMethod)
org.springframework.test.web.client.match中HttpMethod的使用
参数类型为HttpMethod的org.springframework.test.web.client.match中的方法 修饰符和类型 方法 说明 static RequestMatcher
MockRestRequestMatchers. method(HttpMethod method)
Assert theHttpMethod
of the request.org.springframework.test.web.reactive.server中HttpMethod的使用
返回HttpMethod的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 HttpMethod
ExchangeResult. getMethod()
Return the method of the request.参数类型为HttpMethod的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<ClientHttpResponse>
HttpHandlerConnector. connect(HttpMethod httpMethod, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)
WebTestClient.RequestBodyUriSpec
WebTestClient. method(HttpMethod method)
Prepare a request for the specifiedHttpMethod
.org.springframework.test.web.servlet.request中HttpMethod的使用
参数类型为HttpMethod的org.springframework.test.web.servlet.request中的方法 修饰符和类型 方法 说明 static MockHttpServletRequestBuilder
MockMvcRequestBuilders. request(HttpMethod method, String urlTemplate, Object... uriVars)
Create aMockHttpServletRequestBuilder
for a request with the given HTTP method.static MockHttpServletRequestBuilder
MockMvcRequestBuilders. request(HttpMethod httpMethod, URI uri)
Create aMockHttpServletRequestBuilder
for a request with the given HTTP method.org.springframework.web中HttpMethod的使用
返回变量类型为HttpMethod的类型的org.springframework.web中的方法 修饰符和类型 方法 说明 Set<HttpMethod>
HttpRequestMethodNotSupportedException. getSupportedHttpMethods()
Return the actually supported HTTP methods asHttpMethod
instances, ornull
if not known.org.springframework.web.client中HttpMethod的使用
返回变量类型为HttpMethod的类型的org.springframework.web.client中的方法 修饰符和类型 方法 说明 ListenableFuture<Set<HttpMethod>>
AsyncRestOperations. optionsForAllow(String url, Object... uriVariables)
已过时。Asynchronously return the value of the Allow header for the given URI.ListenableFuture<Set<HttpMethod>>
AsyncRestOperations. optionsForAllow(String url, Map<String,?> uriVariables)
已过时。Asynchronously return the value of the Allow header for the given URI.ListenableFuture<Set<HttpMethod>>
AsyncRestOperations. optionsForAllow(URI url)
已过时。Asynchronously return the value of the Allow header for the given URL.ListenableFuture<Set<HttpMethod>>
AsyncRestTemplate. optionsForAllow(String url, Object... uriVars)
已过时。ListenableFuture<Set<HttpMethod>>
AsyncRestTemplate. optionsForAllow(String url, Map<String,?> uriVars)
已过时。ListenableFuture<Set<HttpMethod>>
AsyncRestTemplate. optionsForAllow(URI url)
已过时。Set<HttpMethod>
RestOperations. optionsForAllow(String url, Object... uriVariables)
Return the value of the Allow header for the given URI.Set<HttpMethod>
RestOperations. optionsForAllow(String url, Map<String,?> uriVariables)
Return the value of the Allow header for the given URI.Set<HttpMethod>
RestOperations. optionsForAllow(URI url)
Return the value of the Allow header for the given URL.Set<HttpMethod>
RestTemplate. optionsForAllow(String url, Object... uriVariables)
Set<HttpMethod>
RestTemplate. optionsForAllow(String url, Map<String,?> uriVariables)
Set<HttpMethod>
RestTemplate. optionsForAllow(URI url)
参数类型为HttpMethod的org.springframework.web.client中的方法 修饰符和类型 方法 说明 protected <T> ListenableFuture<T>
AsyncRestTemplate. doExecute(URI url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
已过时。Execute the given method on the provided URI.protected <T> T
RestTemplate. doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the given method on the provided URI.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String,?> uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestOperations. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)
已过时。Asynchronously execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables)
已过时。<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String,?> uriVariables)
已过时。<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables)
已过时。<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables)
已过时。<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType)
已过时。<T> ListenableFuture<ResponseEntity<T>>
AsyncRestTemplate. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)
已过时。<T> ResponseEntity<T>
RestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestOperations. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response asResponseEntity
.<T> ResponseEntity<T>
RestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables)
<T> ResponseEntity<T>
RestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String,?> uriVariables)
<T> ResponseEntity<T>
RestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables)
<T> ResponseEntity<T>
RestTemplate. exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables)
<T> ResponseEntity<T>
RestTemplate. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType)
<T> ResponseEntity<T>
RestTemplate. exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)
<T> ListenableFuture<T>
AsyncRestOperations. execute(String url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, preparing the request with theAsyncRequestCallback
, and reading the response with aResponseExtractor
.<T> ListenableFuture<T>
AsyncRestOperations. execute(String url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
已过时。Asynchronously execute the HTTP method to the given URI template, preparing the request with theAsyncRequestCallback
, and reading the response with aResponseExtractor
.<T> ListenableFuture<T>
AsyncRestOperations. execute(URI url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
已过时。Asynchronously execute the HTTP method to the given URL, preparing the request with theAsyncRequestCallback
, and reading the response with aResponseExtractor
.<T> ListenableFuture<T>
AsyncRestTemplate. execute(String url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
已过时。<T> ListenableFuture<T>
AsyncRestTemplate. execute(String url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
已过时。<T> ListenableFuture<T>
AsyncRestTemplate. execute(URI url, HttpMethod method, AsyncRequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
已过时。<T> T
RestOperations. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestOperations. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestOperations. execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the HTTP method to the given URL, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the HTTP method to the given URL, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.default void
ResponseErrorHandler. handleError(URI url, HttpMethod method, ClientHttpResponse response)
Alternative toResponseErrorHandler.handleError(ClientHttpResponse)
with extra information providing access to the request URL and HTTP method.protected void
RestTemplate. handleResponse(URI url, HttpMethod method, ClientHttpResponse response)
Handle the given response, performing appropriate logging and invoking theResponseErrorHandler
if necessary.org.springframework.web.context.request中HttpMethod的使用
返回HttpMethod的org.springframework.web.context.request中的方法 修饰符和类型 方法 说明 HttpMethod
ServletWebRequest. getHttpMethod()
Return the HTTP method of the request.org.springframework.web.cors中HttpMethod的使用
返回变量类型为HttpMethod的类型的org.springframework.web.cors中的方法 修饰符和类型 方法 说明 List<HttpMethod>
CorsConfiguration. checkHttpMethod(HttpMethod requestMethod)
Check the HTTP request method (or the method from theAccess-Control-Request-Method
header on a pre-flight request) against the configured allowed methods.protected List<HttpMethod>
DefaultCorsProcessor. checkMethods(CorsConfiguration config, HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a pre-flight request.参数类型为HttpMethod的org.springframework.web.cors中的方法 修饰符和类型 方法 说明 void
CorsConfiguration. addAllowedMethod(HttpMethod method)
Add an HTTP method to allow.List<HttpMethod>
CorsConfiguration. checkHttpMethod(HttpMethod requestMethod)
Check the HTTP request method (or the method from theAccess-Control-Request-Method
header on a pre-flight request) against the configured allowed methods.protected List<HttpMethod>
DefaultCorsProcessor. checkMethods(CorsConfiguration config, HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a pre-flight request.org.springframework.web.cors.reactive中HttpMethod的使用
返回变量类型为HttpMethod的类型的org.springframework.web.cors.reactive中的方法 修饰符和类型 方法 说明 protected List<HttpMethod>
DefaultCorsProcessor. checkMethods(CorsConfiguration config, HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a pre-flight request.参数类型为HttpMethod的org.springframework.web.cors.reactive中的方法 修饰符和类型 方法 说明 protected List<HttpMethod>
DefaultCorsProcessor. checkMethods(CorsConfiguration config, HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a pre-flight request.org.springframework.web.multipart中HttpMethod的使用
返回HttpMethod的org.springframework.web.multipart中的方法 修饰符和类型 方法 说明 HttpMethod
MultipartHttpServletRequest. getRequestMethod()
Return this request's method as a convenient HttpMethod instance.org.springframework.web.multipart.support中HttpMethod的使用
返回HttpMethod的org.springframework.web.multipart.support中的方法 修饰符和类型 方法 说明 HttpMethod
AbstractMultipartHttpServletRequest. getRequestMethod()
org.springframework.web.reactive.function.client中HttpMethod的使用
返回HttpMethod的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 HttpMethod
ClientRequest. method()
Return the HTTP method.参数类型为HttpMethod的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 static ClientRequest.Builder
ClientRequest. create(HttpMethod method, URI url)
Create a request builder with the given method and url.ClientRequest.Builder
ClientRequest.Builder. method(HttpMethod method)
Set the method of the request.static ClientRequest.Builder
ClientRequest. method(HttpMethod method, URI url)
已过时。in favor ofClientRequest.create(HttpMethod, URI)
WebClient.RequestBodyUriSpec
WebClient. method(HttpMethod method)
Start building a request for the givenHttpMethod
.org.springframework.web.reactive.function.server中HttpMethod的使用
返回HttpMethod的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 default HttpMethod
ServerRequest. method()
Get the HTTP method.参数类型为HttpMethod的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 EntityResponse.Builder<T>
EntityResponse.Builder. allow(HttpMethod... allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.B
ServerResponse.HeadersBuilder. allow(HttpMethod... allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.static RequestPredicate
RequestPredicates. method(HttpMethod httpMethod)
Return aRequestPredicate
that matches if the request's HTTP method is equal to the given method.ServerRequest.Builder
ServerRequest.Builder. method(HttpMethod method)
Set the method of the request.static RequestPredicate
RequestPredicates. methods(HttpMethod... httpMethods)
Return aRequestPredicate
that matches if the request's HTTP method is equal to one the of the given methods.类型变量类型为HttpMethod的org.springframework.web.reactive.function.server中的方法参数 修饰符和类型 方法 说明 EntityResponse.Builder<T>
EntityResponse.Builder. allow(Set<HttpMethod> allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.B
ServerResponse.HeadersBuilder. allow(Set<HttpMethod> allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.void
RequestPredicates.Visitor. method(Set<HttpMethod> methods)
Receive notification of an HTTP method predicate.org.springframework.web.reactive.function.server.support中HttpMethod的使用
返回HttpMethod的org.springframework.web.reactive.function.server.support中的方法 修饰符和类型 方法 说明 HttpMethod
ServerRequestWrapper. method()
org.springframework.web.server中HttpMethod的使用
返回变量类型为HttpMethod的类型的org.springframework.web.server中的方法 修饰符和类型 方法 说明 Set<HttpMethod>
MethodNotAllowedException. getSupportedMethods()
Return the list of supported HTTP methods.参数类型为HttpMethod的org.springframework.web.server中的构造器 构造器 说明 MethodNotAllowedException(HttpMethod method, Collection<HttpMethod> supportedMethods)
类型变量类型为HttpMethod的org.springframework.web.server中的构造器参数 构造器 说明 MethodNotAllowedException(String method, Collection<HttpMethod> supportedMethods)
MethodNotAllowedException(HttpMethod method, Collection<HttpMethod> supportedMethods)
org.springframework.web.servlet.function中HttpMethod的使用
返回HttpMethod的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 default HttpMethod
ServerRequest. method()
Get the HTTP method.参数类型为HttpMethod的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 EntityResponse.Builder<T>
EntityResponse.Builder. allow(HttpMethod... allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.B
ServerResponse.HeadersBuilder. allow(HttpMethod... allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.static RequestPredicate
RequestPredicates. method(HttpMethod httpMethod)
Return aRequestPredicate
that matches if the request's HTTP method is equal to the given method.ServerRequest.Builder
ServerRequest.Builder. method(HttpMethod method)
Set the method of the request.static RequestPredicate
RequestPredicates. methods(HttpMethod... httpMethods)
Return aRequestPredicate
that matches if the request's HTTP method is equal to one the of the given methods.类型变量类型为HttpMethod的org.springframework.web.servlet.function中的方法参数 修饰符和类型 方法 说明 EntityResponse.Builder<T>
EntityResponse.Builder. allow(Set<HttpMethod> allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.B
ServerResponse.HeadersBuilder. allow(Set<HttpMethod> allowedMethods)
Set the set of allowedHTTP methods
, as specified by theAllow
header.void
RequestPredicates.Visitor. method(Set<HttpMethod> methods)
Receive notification of an HTTP method predicate.org.springframework.web.socket.sockjs.support中HttpMethod的使用
参数类型为HttpMethod的org.springframework.web.socket.sockjs.support中的方法 修饰符和类型 方法 说明 protected boolean
AbstractSockJsService. checkOrigin(ServerHttpRequest request, ServerHttpResponse response, HttpMethod... httpMethods)
protected void
AbstractSockJsService. sendMethodNotAllowed(ServerHttpResponse response, HttpMethod... httpMethods)
org.springframework.web.socket.sockjs.transport中HttpMethod的使用
返回HttpMethod的org.springframework.web.socket.sockjs.transport中的方法 修饰符和类型 方法 说明 HttpMethod
TransportType. getHttpMethod()