public class MockMvcClientHttpRequestFactory extends Object implements ClientHttpRequestFactory, AsyncClientHttpRequestFactory
ClientHttpRequestFactory for requests executed via MockMvc.
 As of 5.0 this class also implements
 AsyncClientHttpRequestFactory. However note that
 AsyncRestTemplate and related classes
 have been deprecated at the same time.
| Constructor and Description | 
|---|
| MockMvcClientHttpRequestFactory(MockMvc mockMvc) | 
| Modifier and Type | Method and Description | 
|---|---|
| AsyncClientHttpRequest | createAsyncRequest(URI uri,
                  HttpMethod method)Create a new asynchronous  AsyncClientHttpRequestfor the specified URI
 and HTTP method. | 
| ClientHttpRequest | createRequest(URI uri,
             HttpMethod httpMethod)Create a new  ClientHttpRequestfor the specified URI and HTTP method. | 
public MockMvcClientHttpRequestFactory(MockMvc mockMvc)
public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod)
ClientHttpRequestFactoryClientHttpRequest for the specified URI and HTTP method.
 The returned request can be written to, and then executed by calling
 ClientHttpRequest.execute().
createRequest in interface ClientHttpRequestFactoryuri - the URI to create a request forhttpMethod - the HTTP method to executepublic AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod method)
AsyncClientHttpRequestFactoryAsyncClientHttpRequest for the specified URI
 and HTTP method.
 The returned request can be written to, and then executed by calling
 AsyncClientHttpRequest.executeAsync().
createAsyncRequest in interface AsyncClientHttpRequestFactoryuri - the URI to create a request formethod - the HTTP method to execute