public abstract class BaseRestConnectOperation extends Object
| Constructor and Description |
|---|
BaseRestConnectOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doRequest(RestConnection connection,
org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder,
int responseTimeoutMillis,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,HttpResponseAttributes> callback)
Performs the request using the given
builder and connection and completes
the callback accordingly. |
protected void |
doVoidRequest(RestConnection connection,
org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder,
int responseTimeoutMillis,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,HttpResponseAttributes> callback)
Performs the request using the given
builder and connection and completes
the callback accordingly, expecting the response to not contain a body. |
protected org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder |
requestBuilder(String baseUri,
String path,
org.mule.runtime.http.api.HttpConstants.Method method,
org.mule.runtime.api.metadata.TypedValue<InputStream> body,
RequestParameters parameters)
Creates a preconfigured
HttpRequestBuilder per the given parameters. |
protected void doRequest(RestConnection connection, org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder, int responseTimeoutMillis, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper, org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,HttpResponseAttributes> callback)
builder and connection and completes
the callback accordingly.connection - the connection to usebuilder - the request builderresponseTimeoutMillis - the request timeout in millisstreamingHelper - the StreamingHelpercallback - the operation's CompletionCallbackprotected void doVoidRequest(RestConnection connection, org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder, int responseTimeoutMillis, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,HttpResponseAttributes> callback)
builder and connection and completes
the callback accordingly, expecting the response to not contain a body.
If successful, the callback will be completed with an empty String as payload.connection - the connection to usebuilder - the request builderresponseTimeoutMillis - the request timeout in millisstreamingHelper - the StreamingHelpercallback - the operation's CompletionCallbackprotected org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder(String baseUri, String path, org.mule.runtime.http.api.HttpConstants.Method method, org.mule.runtime.api.metadata.TypedValue<InputStream> body, RequestParameters parameters)
HttpRequestBuilder per the given parameters.
This method automatically merges and configures query params and headers per the config's default
and the operation's specific parameters. It also handles the TRANSFER_ENCODING and CONTENT-LENGTH
parameters based on the provided headers and body.
The returned builder can still to add/change additional information.
baseUri - the base uri to be usedpath - the path of the resource to request, relative to the base URImethod - the request methodbody - a nullable TypedValue to be sent as the request entityparameters - the request parametersHttpRequestBuilderCopyright © 2019. All rights reserved.