类 HttpRequestWrapper
- java.lang.Object
- org.springframework.http.client.support.HttpRequestWrapper
- 所有已实现的接口:
HttpMessage
,HttpRequest
public class HttpRequestWrapper extends Object implements HttpRequest
Provides a convenient implementation of theHttpRequest
interface that can be overridden to adapt the request.These methods default to calling through to the wrapped request object.
- 从以下版本开始:
- 3.1
- 作者:
- Arjen Poutsma
构造器概要
构造器 构造器 说明 HttpRequestWrapper(HttpRequest request)
Create a newHttpRequest
wrapping the given request object.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 HttpHeaders
getHeaders()
Return the headers of the wrapped request.HttpMethod
getMethod()
Return the method of the wrapped request.HttpRequest
getRequest()
Return the wrapped request.URI
getURI()
Return the URI of the wrapped request.
构造器详细资料
HttpRequestWrapper
public HttpRequestWrapper(HttpRequest request)
Create a newHttpRequest
wrapping the given request object.- 参数:
request
- the request object to be wrapped
方法详细资料
getRequest
public HttpRequest getRequest()
Return the wrapped request.
getMethod
public HttpMethod getMethod()
Return the method of the wrapped request.- 指定者:
getMethod
在接口中HttpRequest
- 返回:
- the HTTP method as an HttpMethod enum value, or
null
if not resolvable (e.g. in case of a non-standard HTTP method)
getURI
public URI getURI()
Return the URI of the wrapped request.- 指定者:
getURI
在接口中HttpRequest
- 返回:
- the URI of the request (never
null
)
getHeaders
public HttpHeaders getHeaders()
Return the headers of the wrapped request.- 指定者:
getHeaders
在接口中HttpMessage
- 返回:
- a corresponding HttpHeaders object (never
null
)