Class MockMvcClientHttpRequestFactory
java.lang.Object
org.springframework.test.web.client.MockMvcClientHttpRequestFactory
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ClientHttpRequestFactory
A
ClientHttpRequestFactory
for requests executed via MockMvc
.- Since:
- 3.2
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRequest
(URI uri, HttpMethod httpMethod) Create a newClientHttpRequest
for the specified URI and HTTP method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.client.ClientHttpRequestFactory
close
-
Constructor Details
-
MockMvcClientHttpRequestFactory
-
-
Method Details
-
createRequest
Description copied from interface:ClientHttpRequestFactory
Create a newClientHttpRequest
for the specified URI and HTTP method.The returned request can be written to, and then executed by calling
ClientHttpRequest.execute()
.- Specified by:
createRequest
in interfaceClientHttpRequestFactory
- Parameters:
uri
- the URI to create a request forhttpMethod
- the HTTP method to execute- Returns:
- the created request
-