public interface RestConnection
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUri() |
org.mule.runtime.http.api.domain.message.response.HttpResponse |
send(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
Synchronous invocation of the
HttpRequest against the connection. |
CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> |
sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
Asynchronous invocation of the
HttpRequest against this connection. |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
Function<org.mule.runtime.http.api.domain.message.response.HttpResponse,org.mule.runtime.api.connection.ConnectionValidationResult> whenComplete,
Function<Exception,org.mule.runtime.api.connection.ConnectionValidationResult> onError)
Executes the
HttpRequest and validates the response to generate the corresponding ConnectionValidationResult. |
String getBaseUri()
CompletableFuture<org.mule.runtime.http.api.domain.message.response.HttpResponse> sendAsync(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
HttpRequest against this connection. Allows non-blocking operations to fulfil the SDK
contract for non-blocking support in connectors.request - to be executed.CompletableFuture to handle the async response.org.mule.runtime.http.api.domain.message.response.HttpResponse send(org.mule.runtime.http.api.domain.message.request.HttpRequest request)
throws IOException,
TimeoutException
HttpRequest against the connection. Used for design operations like value providers or
even for paging operations where non-blocking is not supported by SDK.request - to be executed.HttpResponse the server response.IOExceptionTimeoutExceptionorg.mule.runtime.api.connection.ConnectionValidationResult validate(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
Function<org.mule.runtime.http.api.domain.message.response.HttpResponse,org.mule.runtime.api.connection.ConnectionValidationResult> whenComplete,
Function<Exception,org.mule.runtime.api.connection.ConnectionValidationResult> onError)
HttpRequest and validates the response to generate the corresponding ConnectionValidationResult.request - to be executed.whenComplete - to process an HttpResponse and return a ConnectionValidationResult.onError - to process an Exception, that happened from client side before calling the server, and return a
ConnectionValidationResult.ConnectionValidationResult.Copyright © 2022. All rights reserved.