# HTTP Request

Source: https://openflow.run/en/docs/nodes/http-request/
Language: en
Product version: 0.1.0-beta.77

Call an HTTP endpoint without an OpenAPI document or Connector Action.

Use HTTP Request for a single HTTP(S) call. The node owns generated ports, parameter encoding, and response parsing.

## Configure the request

Business configuration selects method, query/header modes, authentication, body format, response format, and status policy. URL and request values belong in `inputs`, including fixed values.

```json
{
  "op": "node.add", "as": "request", "type": "http-request", "name": "Read service status",
  "config": { "method": "GET", "responseFormat": "json", "statusPolicy": "success" },
  "inputs": { "url": { "kind": "value", "value": "https://api.example.com/status" } }
}
```

Replace the example endpoint before running. For named query or header fields, configure the group’s names and bind `query.NAME` or `header.NAME`. Whole-object mode uses `query` or `headers` instead.

HTTP Request performs one GET and exposes body, statusCode, and headers.

**Input**
GET https://api.example.com/status

**Expected result**
For a successful JSON endpoint, body contains its decoded response and statusCode contains its HTTP status.

**Before running**
Replace the example URL with your endpoint and configure authentication if required.

[Download workflow](https://openflow.run/docs/examples/http-status.openflow.json)

## Authentication

Authentication supports the advertised choices such as bearer, Basic, or API key. Credential fields accept Variables or upstream outputs rather than fixed literal credentials. Bearer uses `auth.token`; Basic uses `auth.username` and `auth.password`.

Authentication is replaced as a whole choice. Changing parameter modes removes bindings for removed ports while preserving configured names according to the edit contract.

## Results

Outputs are always `body`, `statusCode`, and `headers`. A JSON array remains one body value. Choose automatic, JSON, or text response parsing according to the endpoint.

The default success policy treats non-2xx status as failure. Use `statusPolicy: "all"` when downstream Condition logic should inspect a non-success response. Network and parsing failures still fail.

## Failure handling

HTTP Request supports ordinary retries and `onError` handling. There is no separate error execution edge. Retrying a write can repeat its remote effect; choose that policy with the endpoint’s behavior in mind.

## Sources

*   [docs/authoring/node-authoring.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/authoring/node-authoring.md#http-request)
*   [docs/control/contracts/control-api.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/control/contracts/control-api.md#http-request-tasks)
*   [packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts)
