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,
RequestParameters parameters)
Creates a preconfigured
HttpRequestBuilder per the given parameters. |
protected void |
setBody(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder,
org.mule.runtime.api.metadata.TypedValue<InputStream> body)
Sets the request body, and media-type and content-length headers from it if those are not already defined.
|
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 void setBody(org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder builder,
org.mule.runtime.api.metadata.TypedValue<InputStream> body)
builder - the request builderbody - the request body (nullable)protected org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder requestBuilder(String baseUri, String path, org.mule.runtime.http.api.HttpConstants.Method method, RequestParameters parameters)
HttpRequestBuilder per the given parameters.
This creates a new HttpRequestBuilder and initializes it's URI, method, custom query params and custom headers.
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 methodparameters - the request parametersHttpRequestBuilderCopyright © 2019. All rights reserved.