public interface RestConnection
HttpClient| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<String,HttpResponseAttributes>> |
bodylessRequest(RestRequestBuilder requestBuilder,
int responseTimeoutMillis,
org.mule.runtime.api.metadata.MediaType defaultResponseMediaType,
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(RestRequestBuilder requestBuilder,
int responseTimeoutMillis,
org.mule.runtime.api.metadata.MediaType defaultResponseMediaType,
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 |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(ConnectionValidationSettings settings,
int responseTimeoutMillis)
Sends a request as configured using provided settings builder and validates it using the provided conditions.
|
CompletableFuture<org.mule.runtime.extension.api.runtime.operation.Result<InputStream,HttpResponseAttributes>> request(RestRequestBuilder requestBuilder, int responseTimeoutMillis, org.mule.runtime.api.metadata.MediaType defaultResponseMediaType, 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 RestRequestBuilder 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(RestRequestBuilder requestBuilder, int responseTimeoutMillis, org.mule.runtime.api.metadata.MediaType defaultResponseMediaType, 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 RestRequestBuilder 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 repeatableCompletableFutureorg.mule.runtime.api.connection.ConnectionValidationResult validate(ConnectionValidationSettings settings, int responseTimeoutMillis)
ConnectionValidationResult corresponding to this validation result.settings - the settings that indicate how to do this request and the validations to do in it's response.responseTimeoutMillis - the request timeout in millisecondsConnectionValidationResult corresponding to this validation resultString getBaseUri()
void stop()
HttpClientCopyright © 2021. All rights reserved.