Client: HttpSecureClient

Provides secure HTTP remote functions for interacting with HTTP endpoints. This will make use of the authentication schemes configured in the HTTP client endpoint to secure the HTTP requests.

Remote Methods

post

This wraps the HttpSecureClient.post() function of the underlying HTTP remote functions provider.

head

This wraps the HttpSecureClient.head() function of the underlying HTTP remote functions provider.

put

This wraps the HttpSecureClient.put() function of the underlying HTTP remote functions provider.

execute

This wraps the HttpSecureClient.execute() function of the underlying HTTP remote functions provider.

patch

This wraps the HttpSecureClient.patch() function of the underlying HTTP remote functions provider.

delete

This wraps the HttpSecureClient.delete() function of the underlying HTTP remote functions provider.

get

This wraps the HttpSecureClient.get() function of the underlying HTTP remote functions provider.

options

This wraps the HttpSecureClient.options() function of the underlying HTTP remote functions provider.

forward

This wraps the HttpSecureClient.forward() function of the underlying HTTP remote functions provider.

submit

This wraps the HttpSecureClient.submit() function of the underlying HTTP remote functions provider.

getResponse

This just passes the request to the actual network call.

hasPromise

Passes the request to an actual network call.

getNextPromise

Passes the request to an actual network call.

getPromisedResponse

Passes the request to an actual network call.

rejectPromise

Passes the request to an actual network call.

Fields

  • url string(default "")
  • The URL of the remote HTTP endpoint

  • config ClientConfiguration(default {})
  • The configurations of the client endpoint associated with this HttpActions instance

  • httpClient HttpClient
  • The underlying HttpActions instance, which will make the actual network calls

post

function post(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.post() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage
  • An HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

function head(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.head() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage (default ())
  • An optional HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

put

function put(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.put() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage
  • An HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

execute

function execute(string httpVerb, string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.execute() function of the underlying HTTP remote functions provider. Add relevant authentication headers o the request and send the request to actual network call.

Parameters

  • httpVerb string
  • HTTP verb value

  • message RequestMessage
  • An HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

patch

function patch(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.patch() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage
  • An optional HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

delete

function delete(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.delete() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage (default ())
  • An optional HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

get

function get(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.get() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage (default ())
  • An optional HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

options

function options(string path, RequestMessage message) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.options() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • message RequestMessage (default ())
  • An optional HTTP outbound request or any allowed payload

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

forward

function forward(string path, Request request) returns Response | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.forward() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • request Request
  • An HTTP inbound request message

Return Type

(Response | ClientError)

The response or an http:ClientError if failed to establish the communication with the upstream server

submit

function submit(string httpVerb, string path, RequestMessage message) returns HttpFuture | ClientError
Isolated Function
Remote Function

This wraps the HttpSecureClient.submit() function of the underlying HTTP remote functions provider. Add relevant authentication headers to the request and send the request to actual network call.

Parameters

  • httpVerb string
  • The HTTP verb value

  • message RequestMessage
  • An HTTP outbound request or any allowed payload

Return Type

(HttpFuture | ClientError)

An http:HttpFuture that represents an asynchronous service invocation, or else an http:ClientError if the submission fails

getResponse

function getResponse(HttpFuture httpFuture) returns Response | ClientError
Isolated Function
Remote Function

This just passes the request to the actual network call.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

Return Type

(Response | ClientError)

An http:Response message or else an http:ClientError if the invocation fails

hasPromise

function hasPromise(HttpFuture httpFuture) returns boolean
Isolated Function
Remote Function

Passes the request to an actual network call.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

Return Type

(boolean)

A boolean, which represents whether an http:PushPromise exists

getNextPromise

function getNextPromise(HttpFuture httpFuture) returns PushPromise | ClientError
Isolated Function
Remote Function

Passes the request to an actual network call.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

Return Type

(PushPromise | ClientError)

An http:PushPromise message or else an http:ClientError if the invocation fails

getPromisedResponse

function getPromisedResponse(PushPromise promise) returns Response | ClientError
Isolated Function
Remote Function

Passes the request to an actual network call.

Parameters

Return Type

(Response | ClientError)

A promised http:Response message or else an http:ClientError if the invocation fails

rejectPromise

function rejectPromise(PushPromise promise)
Isolated Function
Remote Function

Passes the request to an actual network call.

Parameters