restcall

Intended for basic HTTP requests. The action is considered failed if the response code is >= 500.

Parameters

Name Type Constraints Default Definition
command string required   HTTP command
method string required   Method to send (GET|POST|PUT|DELETE)
body any optional “” Body for POST and PUT requests. If the value is a list or a dictionary, it will be converted to json.
contentType string optional “” Content-type header
headers string optional [] Request headers
auth map optional [] Type of authentication (only basic is supported (1.18+))
acceptAllCertificates boolean optional false Disable SSL certificate verification

Return Values

Name Type Definition
response-code string Request’s response code
content string Response body
status-line string Response status line
headers map Response headers

Example Usage

getSomething:
    action: restcall
    parameters:
        command: https://somewhere:8080/something
        method: GET
        auth:
            type: basic
            user: jhon@somewhere.com
            password: p@ssw0rD
        contentType: application/json
    output:
        request.content: content
        request.response-code: response-code