Package org.springframework.http.client
Interface ClientHttpRequestFactory
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AbstractClientHttpRequestFactoryWrapper
,BufferingClientHttpRequestFactory
,HttpComponentsClientHttpRequestFactory
,InterceptingClientHttpRequestFactory
,MockMvcClientHttpRequestFactory
,OkHttp3ClientHttpRequestFactory
,SimpleClientHttpRequestFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Factory for
ClientHttpRequest
objects.
Requests are created by the createRequest(URI, HttpMethod)
method.- Since:
- 3.0
- Author:
- Arjen Poutsma
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
createRequest
(URI uri, HttpMethod httpMethod) Create a newClientHttpRequest
for the specified URI and HTTP method.
-
Method Details
-
createRequest
Create a newClientHttpRequest
for the specified URI and HTTP method.The returned request can be written to, and then executed by calling
ClientHttpRequest.execute()
.- Parameters:
uri
- the URI to create a request forhttpMethod
- the HTTP method to execute- Returns:
- the created request
- Throws:
IOException
- in case of I/O errors
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-