> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/reference/actions/requests.md).

# requests Action

Sends concurrent requests. Can be configured either by an inline JSON template or by referencing a JSON template in the `src` attribute.

The result of executing the template, whether given inline or referenced, must be a JSON object with the a property for each request ID with a JSON object like defined for the [`request` action](/flat/reference/actions/request.md) as its value.

Example: `requests` with inline JSON

```markup
<requests>
{
  "main":{
     "url":"http://example.com",
     "method":"GET",
     …
   },
  "foo":{
     "url":"http://example.com",
     "method":"POST",
     …
  },
  "bar":{
     …
  }
}
</requests>
```

**Note:** An `id` property in the JSON request configuration will be ignored:

```javascript
{
  "myID":{
     "id":"ignored",
     "url":"http://example.com",
     "method":"GET",
     …
   },
   …
}
```

Example: `requests` with referenced resource

```markup
<requests src="requests.json"/>
```

with requests.json:

```javascript
{
  "main":{
     "url":"http://example.com",
     "method":"GET",
     …
   },
  "foo":{
     "url":"http://example.com",
     "method":"POST",
     …
  },
  "bar":{
     …
  }
}
```

Example: `requests` with variable

```markup
<template out="$requests">
{
  "main":{
     "url":"http://example.com",
     "method":"GET",
     …
   },
  "foo":{
     "url":"http://example.com",
     "method":"POST",
     …
  },
  "bar":{
     …
  }
}
</template>
<requests src="$requests"/>
```

## See also

* [`request` action](/flat/reference/actions/request.md) (reference)
