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

# Execute HTTP request

> Executes an HTTP request and gets items from an external endpoint one by one, with optional pagination.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Executes an HTTP request and gets items from an external endpoint one by one, with optional pagination. For each item that reaches it, this step calls an external web service, reads the response, and passes on the result as one or more items. It can follow pagination to keep requesting further pages and hand back the items from every page one by one, which makes it well suited to pulling lists of records such as products, orders, or customers out of an API. The values from the incoming item are available as [placeholders](/references/placeholders), so the request can be tailored per item.

This documentation describes: [Schema](/schemas/transformer-step/http)

## Fields

The Request group describes the call to make.

<FormField property="request.method" label="Request Method">
  The HTTP method to use, such as `GET`, `POST`, `PUT`, or `DELETE`. Defaults to `GET`. Supports [placeholders](/references/placeholders).
</FormField>

<FormField property="request.uri" label="Request URI" required>
  The address to call. When your HTTP API connection has a base address, start with a slash and give only the part after it, for example `/orders`. Supports [placeholders](/references/placeholders).
</FormField>

<FormField property="request.querySerializer" label="Request URI formatter" diType="http-query-string-serializer">
  Controls how spaces and special characters in the address are encoded, for example `%20` versus `+`. Leave it on the default (Form URL encoded) unless the target service is particular about this.
</FormField>

<FormField property="request.plugins[]" label="Plugins to use" diType="http-client-plugin-configurator">
  Extra behaviours applied to this request, such as adding fixed headers or retrying on failure. Add as many as you need.
</FormField>

<FormField property="request.authentications[]" label="Authentications to use" diType="http-authentication-configurator">
  One or more ways to authenticate this request, such as an API key or OAuth token.
</FormField>

<FormField property="request.enableLogging" label="Enable logging">
  Whether the request and response are logged. Choose **Inherit from connection** to follow the HTTP API connection's own setting (the default), **Enabled** to always log even when the connection has logging off, or **Disabled** to never log. When set to Enabled you can also pick a log formatter to decide how much detail is recorded.
</FormField>

<FormField property="request.payloadType" label="Payload type">
  How the request body is built. Defaults to **Encoded data**.

  * **Encoded data** builds the body from data you provide and a chosen format. It reveals a **Request Parameters** field (defaults to the whole item via `&{@}`) and a **Request formatter** that sets the body format, such as JSON.
  * **Plain text** sends a single block of text exactly as you type it.
  * **Multipart/form-data** sends a set of named values, useful for file uploads. Each value has a key, a value, and a type (text or file); file values can also carry a filename, a content type, and an option to base64-decode the value before sending.
</FormField>

<FormField property="request.sendPayload" label="Send payload with DELETE">
  Off by default. Turn it on to include a request body when the method is `DELETE`, which some services require.
</FormField>

<FormField property="pagination" label="Follow pagination" diType="http-subscriber-pagination">
  Enables repeated requests to walk through multiple pages of results, returning the items from each page. Leave it unset for a single request.
</FormField>

<FormField property="client" label="HTTP API connection" diType="http-client">
  The pre-configured connection that supplies the base address and shared settings for the call. Leave it on the default connection unless you need a specific one.
</FormField>

<FormField property="deserializer" label="Response parser" diType="stream-deserializer">
  How the response body is read. Defaults to JSON, returning the whole response as a single item. Pick another parser when the service replies in a different format, or to split a list in the response into separate items.
</FormField>

<FormField property="addHeaders" label="Add headers to response body">
  Off by default. When on, each result is wrapped so the response body sits under a `data` key and the response headers are added under a `headers` key.
</FormField>

<FormField property="addHttpStatus" label="Add HTTP status to the response">
  Off by default. When on, each result is wrapped so the response body sits under a `data` key and the HTTP status code and reason phrase are added under an `httpStatus` key.
</FormField>

## Sample data

This step calls an external service for each item passing through a route, so it runs as part of a route rather than on its own. A configuration that fetches an orders list with a `GET` request looks like this:

| Field          | Value     |
| -------------- | --------- |
| Request Method | `GET`     |
| Request URI    | `/orders` |

With this configuration, the step calls the orders endpoint and, with the Response parser set to read the `orders` list from the reply, emits each order as its own item. Turning on **Add HTTP status to the response** would instead wrap each item so its data sits under a `data` key with the status under `httpStatus`.

```json Configuration theme={null}
{
  "prototype": "http",
  "parameters": {
    "request": {
      "method": "GET",
      "uri": "/orders"
    }
  }
}
```
