Top Description Methods
org.springframework.http.client

public Interface ClientHttpRequestFactory

Known Direct Implementers
org.springframework.http.client.HttpComponentsClientHttpRequestFactory, org.springframework.http.client.JdkClientHttpRequestFactory, org.springframework.http.client.JettyClientHttpRequestFactory, org.springframework.http.client.OkHttp3ClientHttpRequestFactory, org.springframework.http.client.ReactorNettyClientRequestFactory, org.springframework.http.client.SimpleClientHttpRequestFactory, org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper
Annotations
@FunctionalInterface
Imports
java.io.IOException, java.net.URI, org.springframework.http.HttpMethod

Factory for ClientHttpRequest objects. Requests are created by the createRequest(URI, HttpMethod) method.
Author
Arjen Poutsma
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public ClientHttpRequest

Returns:

the created request
createRequest
(URI
the URI to create a request for
uri
,
HttpMethod
the HTTP method to execute
httpMethod
)

Create a new ClientHttpRequest for the specified URI and HTTP method.

Method Detail

createRequestback to summary
public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException

Create a new ClientHttpRequest for the specified URI and HTTP method.

The returned request can be written to, and then executed by calling ClientHttpRequest#execute().

Parameters
uri:URI

the URI to create a request for

httpMethod:HttpMethod

the HTTP method to execute

Returns:ClientHttpRequest

the created request

Exceptions
IOException:
in case of I/O errors