public interface RestConnection
HttpClient| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<String,HttpResponseAttributes>> |
bodylessRequest(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder,
int responseTimeoutMillis,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Sends a request for which a response entity is not expected.
|
String |
getBaseUri() |
CompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<InputStream,HttpResponseAttributes>> |
request(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder,
int responseTimeoutMillis,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Sends a request and returns a
CompletableFuture with a Result which output is the response body in
the form of an InputStream and a HttpResponseAttributes. |
void |
stop()
Stops this connection by freeing resources and stopping the underlying
HttpClient |
CompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<InputStream,HttpResponseAttributes>> request(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder, int responseTimeoutMillis, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
CompletableFuture with a Result which output is the response body in
the form of an InputStream and a HttpResponseAttributes.
In case of failure, the future will be exceptionally completed with a RequestException, which
RequestException.getErrorMessage() will have its payload made repeatable through the use of the
streamingHelper
requestBuilder - the HttpRequestBuilder on which the request has been configuredresponseTimeoutMillis - the request timeout in millisecondsstreamingHelper - the StreamingHelper in case an error message needs to have its payload made repeatableCompletableFutureCompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<String,HttpResponseAttributes>> bodylessRequest(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder, int responseTimeoutMillis, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
CompletableFuture with
a Result which holds an empty String as output and a HttpResponseAttributes.
In case of failure, the future will be exceptionally completed with a RequestException, which
RequestException.getErrorMessage() will have its payload made repeatable through the use of the
streamingHelper
requestBuilder - the HttpRequestBuilder on which the request has been configuredresponseTimeoutMillis - the request timeout in millisecondsstreamingHelper - the StreamingHelper in case an error message needs to have its payload made repeatableCompletableFutureString getBaseUri()
void stop()
HttpClientCopyright © 2019. All rights reserved.