HttpClient Interface
public interface HttpClient
A generic interface for sending HTTP requests and getting responses.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Http |
createDefault()
Creates a new HttpClient instance. |
static
Http |
createDefault(HttpClientOptions clientOptions)
Creates a new HttpClient instance. |
abstract
Mono<Http |
send(HttpRequest request)
Send the provided request asynchronously. |
default
Mono<Http |
send(HttpRequest request, Context context)
Sends the provided request asynchronously with contextual information. |
default
Http |
sendSync(HttpRequest request, Context context)
Sends the provided request synchronously with contextual information. |
Method Details
createDefault
public static HttpClient createDefault()
Creates a new HttpClient instance.
Returns:
createDefault
public static HttpClient createDefault(HttpClientOptions clientOptions)
Creates a new HttpClient instance.
Parameters:
Returns:
send
public abstract Mono
Send the provided request asynchronously.
Parameters:
Returns:
send
public default Mono
Sends the provided request asynchronously with contextual information.
Parameters:
Returns:
sendSync
public default HttpResponse sendSync(HttpRequest request, Context context)
Sends the provided request synchronously with contextual information.
Parameters:
Returns: