# lam.httpRequests

## Functionality

The `httpRequests` keyword makes multiple HTTP requests in parallel. Each request in the array follows the same format as `lam.httpRequest`. The responses will be stored in the flow's response object in the same order as the requests.

### Invocation

Data transformation must output:

```javascript
{
  "lam.httpRequests": [
    {
      "method": "GET",
      "url": "https://api.example.com/inventory/{{itemId}}",
      "pathParams": { "itemId": "123" }
    },
    {
      "method": "GET", 
      "url": "https://api.example.com/pricing/{{itemId}}",
      "pathParams": { "itemId": "123" }
    }
  ]
}
```

| Key         | Description                          | Type   | Required |
| ----------- | ------------------------------------ | ------ | -------- |
| method      | HTTP method (GET, POST, PUT, DELETE) | String | Yes      |
| url         | Destination URL                      | String | Yes      |
| pathParams  | URL path parameters                  | Object | No       |
| queryParams | URL query parameters                 | Object | No       |
| headers     | HTTP headers                         | Object | No       |
| body        | Request body                         | Object | No       |

### Examples

```javascript
(payload) => {
  const { input } = payload;
  
  return {
    "lam.httpRequests": input.items.map(item => ({
      "method": "GET",
      "url": "{{props.baseUrl}}/items/{{itemId}}",
      "pathParams": {
        "itemId": item.id
      },
      "headers": {
        "Authorization": "Bearer {{props.apiKey}}"
      }
    }))
  };
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.laminar.run/building-an-integration/keywords/lam.httprequests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
