Skip to content

http-request ​

Call an HTTP or HTTPS endpoint and expose a structured response.

When to use it ​

Use this node for a reviewed service request. Use open-resource when the goal is to open a URL in a browser rather than consume its response.

Example ​

rattish
Rattish: 1

Workflow:
  name: Make an HTTP request

Node step:
  type: http-request
  url: https://api.github.com/repos/zacharyivie/Raticode/releases/latest
  method: GET
  headers:
    Accept: application/vnd.github+json
  response-mode: json
  expected-statuses:
    - 200
  request-timeout: 30s
  finish: pass

GET, a 30-second request timeout, one attempt, and expected status 200 are the defaults. Choose explicit expected statuses for endpoints that return 201 or 204. Set retry attempts, backoff, and retry-on-statuses deliberately, especially for requests that write data.

Use json or body for a request payload, not both. Bound payload ports override the corresponding authored payload. Response modes are auto, json, text, and none. Output includes raw body, parsed JSON where available, selected values, and request metadata.

output-mapping selects response values by supported paths; network-allowlist constrains configured destinations. Use compatible secret bindings for protected values and review redaction fields. An allowed target is not a guarantee that arbitrary response content is trustworthy.

Configuration ​

Configuration fields use hyphens. These are the node-specific fields; shared execution fields apply separately.

FieldTypeRequired / defaultMeaning
methodstring"GET"HTTP method.
urlstringRequiredHTTP or HTTPS endpoint.
headersobject{}String HTTP headers.
paramsobject{}String query parameters.
jsonany JSON valueNot setJSON request body; excludes authored body.
bodystring or nullNot setText request body.
request-timeoutstring"30s"Per-request timeout.
retryobject{"attempts": 1, "backoff": "0s", "retry-on-statuses": []}Attempt count, backoff, and retry-on-statuses map.
expected-statuseslist of integer[200]Accepted HTTP status codes.
response-modeauto, json, text, none"auto"Response interpretation.
output-mappingobject{}Named response selectors.
secret-fieldslist of string[]Request field redaction declarations.
network-allowlistlist of string[]Configured network destination constraints.

Inputs and output ​

Bind these declared ports through with:

PortValue type
urlstring
headersobject
paramsobject
jsonany JSON value
bodystring

Successful output fields use these exact selector names:

FieldValue type
statusinteger
headersobject
bodystring
jsonany JSON value
valueany JSON value
selectedobject
urlstring
methodstring
attemptsinteger (min 1)

For example, refer to node.step.output.status from a compatible downstream binding.

Preflight and limits ​

Preflight validates the URL and network policy without sending the request. Availability, rate limits, authentication, response format, and status are runtime concerns.

Use Raticode rattish check and Raticode rattish preflight before choosing to run the example. The installed contract is available through Raticode rattish docs --format json.

Continue with Node reference, Routes and joins, or Runs and approvals.