# http

Canonical URL: https://developers.iagenify.com/sdk/workflows/steps/http/
Language: en

`type: "http"`

Any HTTP request, with its own guarded loop: every redirect is re-checked, the response is capped, and the timeout is bounded.

Status: url required · 5 redirects · 10 MB · 15 minutes

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `url` | string | required | Where. Missing is refused on save. |
| `method` | string | POST | Any method. |
| `headers` | object |  | Added to `Content-Type: application/json`. |
| `body` | any | the run's context | Sent as JSON. Absent sends the input and the step outputs. |
| `timeoutMs` | integer | 900 000 | Fifteen minutes at most. |

```javascript
{ id: "notify", type: "http", config: {
    url: "https://hooks.example.com/digest",
    method: "POST",
    headers: { Authorization: "Bearer …" },
    body: { text: "{{steps.write.output.text}}" } } }
```

## Output {#output}

```javascript
{{steps.notify.output.status}}    // 200
{{steps.notify.output.body}}      // parsed JSON, or the text
```

## Redirects are followed by hand {#redirects}

> **Each hop is checked again**
>
> Five at most. A redirect that led somewhere private would otherwise be the whole address check undone in one hop — and that is exactly what a redirect is for, from the other side.

A redirect that browsers turn into a GET is turned into a GET here too, without the body.

## The bounds {#bounds}

| Thing | Bound |
| --- | --- |
| Response | 10 MB |
| Redirects | 5 |
| Timeout | 15 minutes |

## A refusal fails the step {#failure}

A status outside the successful range throws, carrying the status, the address and the message the service returned — which is usually the thing that explains it.

- [condition](/sdk/workflows/steps/condition): Branching on the status.
- [Workflow steps](/sdk/workflows/steps): The 23 types.

```python
{"id": "notify", "type": "http", "config": {
    "url": "https://hooks.example.com/digest",
    "method": "POST",
    "headers": {"Authorization": "Bearer …"},
    "body": {"text": "{{steps.write.output.text}}"}}}
```

```python
"{{steps.notify.output.status}}"   # 200
"{{steps.notify.output.body}}"     # parsed JSON, or the text
```
