Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HTTP Client Function enables communication with a third-party HTTP server. Using it stream editors can control outgoing requests handling. This Function supports REST API and also supports authentication via the OAuth 2.0 framework. The following HTTP Client Functions are available in Usage Engine:

...

  1. Select an HTTP request method from the following options:

    HTTP MethodDescription
    GETRequests data from the target server
    POSTSends data to the target server. Select either Body or Form under Content*
    PUTReplaces the current resources of the target URL with the uploaded content. Select either Body or Form under Content*
    PATCHUpdates partial resources of the target URL. Select either Body or Form under Content*
    DELETERemoves all current representations of the target resource


    Note
    titleURL Entry

    Cloud Edition interprets only a single forward slash in the URL fields. Make sure that you format the URLs accordingly. 


    Note
    titleNote!

    *The Body and Form fields are visible only for request methods POST, PUT and PATCH.

    • Select Body or Form and add the corresponding details in the content of the request message. You can use Variable Insertion.
    • Expand the examples below to view samples of HTTP request messages for Body or Form:
    Note
    titleNote!

    The form input needs to be URL encoded, otherwise, it fails.

    HTTP requests use a hardcoded content-type value of ‘application/x-www-form-urlencoded’. 


    Expand
    titleSample of an HTTP body content message


    No Format
    {
    "name" : "my_username",
    "first-name" : "My",
    "last-name" : "Username",
    "display-name" : "My Username",
    "email" : "user@example.test",
    "active" : true
    }



    Expand
    titleSample of an HTTP form content message


    No Format
    name=my_username&first-name=My&last-name=Username&display-name=My%20Username&email=user@example.test&active=true



  2. In Target URL, enter the URL of the target HTTP server.  You can use Variable InsertionYou can select a combination of the following options to be included in the URL:

    OptionDescription
    Include basic access authentication credentialsSelect to add the specified username and password
    Include query string in URLSelect to include a query string in the URL. Add a key and its corresponding value. You can include multiple query strings. 
    Customize header

    Select to customize the headers of the URL and specify multiple keys and their respective values.

    The default value for the HTTP headers “content-type” and “accept” is application/json.

    You can override the default value for HTTP header “content-type”.

    It is recommended that the default value for HTTP header "accept" is left unchanged. The HTTP Functions only support application/json.


...

The Configure Token section of the Function controls the authentication token credentials. The Header Prefix field is the Authorization header placed before the access token. Based on the Grant Type selection there are two types of credentials access provided for the authentication provisions – Password and Client credentials. Each of them has a distinctive configuration option. 

...