> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Make HTTP Request

> Call an external HTTP endpoint and use its body, status, and headers.

**Make HTTP Request** sends an outbound request to an external URL. Use it to
call REST APIs, submit data to web services, or retrieve text-based resources.

<Warning>
  This action cannot call internal or private WorkflowDog URLs. Requests to
  non-external addresses are rejected.
</Warning>

## Inputs

| Input                | Type                                       | Required                       | Description                                                                           |
| -------------------- | ------------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------------- |
| **URL**              | String                                     | Yes                            | The complete destination URL.                                                         |
| **Method**           | `GET`, `POST`, `PUT`, `PATCH`, or `DELETE` | Yes                            | The HTTP method. Defaults to `GET`.                                                   |
| **Body**             | String or file                             | For `POST`, `PUT`, and `PATCH` | The request payload. Its type follows **Content Type** when a known type is selected. |
| **Content Type**     | String                                     | No                             | The MIME type sent in the `Content-Type` header.                                      |
| **Query Parameters** | List of name/value pairs                   | No                             | Parameters added to the URL. Existing parameters with the same name are replaced.     |
| **Headers**          | List of name/value pairs                   | No                             | Request headers.                                                                      |

**Body** and **Content Type** are hidden for `GET` and `DELETE` requests.

### Body types

Known text types—including `application/json`, `text/plain`, `text/csv`, and
XML—use a string body. Known binary types—including `multipart/form-data`,
`application/pdf`, and common image types—use a file body. You can also enter a
custom MIME type; in that case the body accepts any compatible value.

<Note>
  A header added under **Headers** takes precedence over the value generated by
  **Content Type** when both use the same header name.
</Note>

## Outputs

| Output       | Type              | Description                                                        |
| ------------ | ----------------- | ------------------------------------------------------------------ |
| **Response** | String            | The complete response body read as text.                           |
| **Status**   | Number            | The HTTP status code, such as `200` or `404`.                      |
| **Headers**  | Object of strings | Response headers. Select individual header properties when needed. |

The action returns normally for non-success status codes. Branch on **Status**
when a workflow must treat `4xx` or `5xx` responses differently.

## Example: send JSON to an API

Set **Method** to `POST`, **Content Type** to `application/json`, and connect a
JSON string to **Body**:

```json theme={null}
{
  "email": "ada@example.com",
  "plan": "pro"
}
```

Add authentication under **Headers**, then use **Status** to confirm whether
the service accepted the request.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The action returns Invalid URL">
    Use a complete public URL, including `https://`. Internal, loopback, and
    private destinations are blocked.
  </Accordion>

  <Accordion title="A binary response looks corrupted">
    **Response** is always read as text. Use an integration that returns a file
    when the response must preserve raw bytes.
  </Accordion>

  <Accordion title="The API says the body format is wrong">
    Confirm that **Content Type** matches the actual payload. Selecting
    `application/json` does not serialize an object automatically; **Body** must
    already be a JSON string.
  </Accordion>
</AccordionGroup>
