public class

HttpRequestWrapper

extends Object
implements HttpRequest
java.lang.Object
   ↳ org.springframework.http.client.support.HttpRequestWrapper

Class Overview

Provides a convenient implementation of the HttpRequest interface that can be overridden to adapt the request. Methods default to calling through to the wrapped request object.

Summary

Public Constructors
HttpRequestWrapper(HttpRequest request)
Creates a new HttpRequest wrapping the given request object.
Public Methods
HttpHeaders getHeaders()
Returns the headers of the wrapped request.
HttpMethod getMethod()
Returns the method of the wrapped request.
HttpRequest getRequest()
Returns the wrapped request.
URI getURI()
Returns the URI of the wrapped request.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.http.HttpMessage
From interface org.springframework.http.HttpRequest

Public Constructors

public HttpRequestWrapper (HttpRequest request)

Creates a new HttpRequest wrapping the given request object.

Parameters
request the request object to be wrapped

Public Methods

public HttpHeaders getHeaders ()

Returns the headers of the wrapped request.

Returns
  • a corresponding HttpHeaders object

public HttpMethod getMethod ()

Returns the method of the wrapped request.

Returns
  • the HTTP method as an HttpMethod enum value

public HttpRequest getRequest ()

Returns the wrapped request.

public URI getURI ()

Returns the URI of the wrapped request.

Returns
  • the URI of the request