# http_request

HTTP Request

## Beschreibung

Call an external HTTP service with method, URL, headers and an optional body.
Put authentication and Content-Type in headers, e.g. {"Authorization":"Bearer …","Content-Type":"application/json"}.
The body is a string; serialize JSON yourself. Returns status, response headers
(arrays of values), body and body_encoding (utf-8 or base64 for binary).
HTTP error statuses are returned normally. Redirects are NOT followed: inspect
Location before making a separate request; never forward credentials blindly.
Public Internet endpoints only. Request/response body limit: 1 MB; timeout: 30s.
Requests are never automatically retried. A timeout may still mean a mutation succeeded.

## Zugriff

Zugriffsprofil: `gated`. Module: `none`.
Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

## Parameter

| Name | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `account_id` | string | Ja |  |
| `method` | string | Ja |  |
| `url` | string | Ja | Absolute HTTP(S) URL. |
| `headers` | object | Nein |  |
| `body` | string | Nein | Raw request body, e.g. serialized JSON. |

## Eingabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "HEAD",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "OPTIONS"
      ]
    },
    "url": {
      "type": "string",
      "description": "Absolute HTTP(S) URL."
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "body": {
      "type": "string",
      "description": "Raw request body, e.g. serialized JSON."
    }
  },
  "required": [
    "account_id",
    "method",
    "url"
  ],
  "type": "object"
}
```

## Ausgabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "status": {
      "type": "integer"
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "body": {
      "type": "string"
    },
    "body_encoding": {
      "type": "string",
      "enum": [
        "utf-8",
        "base64"
      ]
    }
  },
  "required": [
    "status",
    "headers",
    "body",
    "body_encoding"
  ],
  "type": "object"
}
```
