{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-app-core-core-http",
  "title": "HTTP request",
  "section": "Library asset reference",
  "description": "HTTP request with configurable headers, method and JSON request body.",
  "kind": "node",
  "url": "/wiki/reference-app-core-core-http/",
  "markdown": "/wiki/reference-app-core-core-http/index.md",
  "json": "/wiki/reference-app-core-core-http/index.json",
  "headings": [
    {
      "id": "inputs-outputs-and-configuration",
      "title": "Inputs, outputs and configuration",
      "depth": 2
    },
    {
      "id": "example",
      "title": "Example",
      "depth": 2
    },
    {
      "id": "failure-and-sensitive-data",
      "title": "Failure and sensitive data",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "app-core",
  "contract": {
    "key": "app.core.core.http",
    "slug": "app-core-core-http",
    "name": "HTTP request",
    "kind": "node",
    "family": "app-core",
    "packId": null,
    "category": "Network",
    "description": "HTTP request with configurable headers, method and JSON request body.",
    "inputs": [
      {
        "id": "exec",
        "name": "Execute",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "body",
        "name": "Body",
        "type": "any",
        "typeName": "Any",
        "required": false
      }
    ],
    "outputs": [
      {
        "id": "next",
        "name": "Next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "error",
        "name": "On error",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "data",
        "name": "Data",
        "type": "any",
        "typeName": "Any",
        "required": false
      },
      {
        "id": "status",
        "name": "Status",
        "type": "number",
        "typeName": "Number",
        "required": false
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "title": "URL",
          "default": "https://example.com"
        },
        "method": {
          "type": "string",
          "title": "Method",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "PATCH",
            "DELETE",
            "HEAD"
          ],
          "default": "GET"
        },
        "headers": {
          "type": "object",
          "title": "Headers",
          "default": {}
        },
        "failOnError": {
          "type": "boolean",
          "title": "Fail on HTTP error",
          "default": true
        }
      },
      "required": [
        "url"
      ]
    },
    "documentation": "# HTTP request\n\nPerforms a real HTTP request and exposes its response. Calls execute from the ONF host; retries can repeat externally visible effects.\n\n## Inputs, outputs and configuration\n- **exec** (control): gates execution when wired. **body** (any, optional): serialized as JSON for methods other than GET/HEAD; defaults to {} when absent/null.\n- **data** (any): response text parsed as JSON when possible, otherwise the text string. **status** (number): HTTP status.\n- **next** (control): success. **error** (control): optional exhausted-failure handler.\n- **url** (required string): fresh default `https://example.com`.\n- **method**: GET (default), POST, PUT, PATCH, DELETE or HEAD.\n- **headers** (object): default {}; merged over Content-Type: application/json.\n- **failOnError** (boolean): default true; false returns non-2xx responses normally.\n\n## Example\nFor a JSON POST, set method POST and a placeholder service URL, supply body `{\"message\":\"example\"}`, then inspect data/status. GET and HEAD ignore body. A successful empty response produces an empty string rather than null.\n\n## Failure and sensitive data\nNetwork errors and body-reading failures throw. With failOnError enabled, non-2xx throws `HTTP <status>: <first 500 response characters>`. After retries, a wired error route handles failure, but data/status are cleared: its handler should read `context.errors` rather than require those data outputs. Otherwise the run fails.\n\nURLs, headers, body and response can contain private data and enter saved configuration/history. This generic asset does not read secrets or checkpoint requests. For authorization, duplicate it and obtain secret values inside code; never paste real tokens into headers. A timeout/cancel cannot undo an accepted remote request.",
    "tags": [
      "builtin",
      "node"
    ],
    "source": "app-builtin-catalog"
  }
}
