Functions - http

addCookies
I

Adds cookies to the custom header.

createHttpCachingClient

Creates an HTTP client capable of caching HTTP responses.

createHttpSecureClient

Creates an HTTP client capable of securing HTTP requests with authentication.

extractAuthorizationHeaderValue
I

Extracts the Authorization header value from the request.

invokeEndpoint

The HEAD remote function implementation of the Circuit Breaker.

isResourceSecured
I

Checks whether the calling resource is secured by evaluating the authentication hierarchy.

parseHeader
I

Parses the given header value to extract its value and parameter map.

Isolated Function

Adds cookies to the custom header.

Parameters

createHttpCachingClient

(string url, ClientConfiguration config, CacheConfig cacheConfig)

returns HttpClient | ClientError

Creates an HTTP client capable of caching HTTP responses.

Parameters

  • url string
  • The URL of the HTTP endpoint to connect

  • config ClientConfiguration
  • The configurations for the client endpoint associated with the caching client

  • cacheConfig CacheConfig
  • The configurations for the HTTP cache to be used with the caching client

  • Return Type

    (HttpClient | ClientError)
  • An http:HttpCachingClient instance, which wraps the base http:Client with a caching layer or else an http:ClientError

createHttpSecureClient

(string url, ClientConfiguration config)

returns HttpClient | ClientError

Creates an HTTP client capable of securing HTTP requests with authentication.

Parameters

  • url string
  • Base URL

extractAuthorizationHeaderValue

(Request req)

returns string
Isolated Function

Extracts the Authorization header value from the request.

Parameters

  • Return Type

    (string)
  • Value of the Authorization header

invokeEndpoint

(string path, Request outRequest, HttpOperation requestAction, HttpClient httpClient, string verb)

returns HttpResponse | ClientError

The HEAD remote function implementation of the Circuit Breaker. This wraps the head function of the underlying HTTP remote function provider.

Parameters

  • path string
  • Resource path

  • outRequest Request
  • A Request struct

  • requestAction HttpOperation
  • HttpOperation related to the request

  • httpClient HttpClient
  • HTTP client which uses to call the relevant functions

  • verb string
  • HTTP verb used for submit method

  • Return Type

    (HttpResponse | ClientError)
  • The response for the request or an http:ClientError if failed to establish communication with the upstream server

isResourceSecured

(FilterContext context)

returns boolean
Isolated Function

Checks whether the calling resource is secured by evaluating the authentication hierarchy.

Parameters

  • Return Type

    (boolean)
  • The status of calling resource is secured or not

parseHeader

(string headerValue)

returns [string, map<any>] | ClientError
Isolated Function

Parses the given header value to extract its value and parameter map.

Parameters

  • headerValue string
  • The header value

  • Return Type

    ([string, map<any>] | ClientError)
  • A tuple containing the value and its parameter map or else an http:ClientError if the header parsing fails