Your script can make outbound HTTP requests using popular HTTP packages for your given language.

Making outbound HTTP requests

HTTP support is only available in our JavaScript and Python runtimes.

Code you run with the execute code endpoint can make outbound HTTP requests. By default all HTTP requests are blocked. Configure allowed hosts and (optionally) associated credentials with the http request parameter.

Allowed host patterns

Values of the host parameter within an allowed HTTP request configuration support two types of pattern matching.

  • * matches all hosts
  • *.example.com matches all subdomains of example.com, but not example.com itself

Adding authentication credentials

Rather than exposing HTTP authentication credentials to your code, you can pass credentials to Riza directly and we’ll add them to outbound HTTP requests via a proxy. This ensures the safety of credentials from malicious code.

{
    "http": {
        "allow": [{
            "host": "api.sendgrid.com",
            "auth": {
                "bearer": {
                    "token": "<sendgrid api key>",
                },
            }
        }]
    }
}