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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Standard Actions

> Actions available in the standard library

These actions are available in all Runbooks as part of the standard library.

## send_http_request

The `std::send_http_request` action makes an HTTP request to the specified URL.

### Inputs

| Name         | Required | Type    | Description                                            |
| ------------ | -------- | ------- | ------------------------------------------------------ |
| `url`        | required | string  | The URL to send the request to                         |
| `method`     | optional | string  | The HTTP method (GET, HEAD, POST). Default: GET        |
| `headers`    | optional | map     | HTTP headers to include in the request                 |
| `body`       | optional | string  | The request body (for POST requests)                      |
| `timeout_ms` | optional | integer | Request timeout in milliseconds                        |

### Outputs

| Name            | Type    | Description          |
| --------------- | ------- | -------------------- |
| `status_code`   | integer | The HTTP status code |
| `response_body` | string  | The response body    |

```hcl
action "api_call" "std::send_http_request" {
    description = "Fetch data from API"
    url = "https://api.example.com/data"
    method = "GET"
    headers = {
        "Authorization" = "Bearer ${variable.token}"
    }
}

output "response" {
    value = action.api_call.response_body
}

output "status" {
    value = action.api_call.status_code
}
```

### POST Request Example

```hcl
action "create_resource" "std::send_http_request" {
    description = "Create a new resource"
    url = "https://api.example.com/resources"
    method = "POST"
    headers = {
        "Content-Type" = "application/json"
    }
    body = {
        "name" = variable.name,
        "value" = variable.value
    }
}
```
