You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/content/docs/datasources/http.mdx

48 lines
1.0 KiB

---
description: |
The `http` data source makes an HTTP `GET` request to the specified URL and exports information about the response.
page_title: http data source reference
---
<BadgesHeader>
<PluginBadge type="official" />
<PluginBadge type="hcp_packer_ready" />
</BadgesHeader>
# `http`
The `http` data source makes an HTTP `GET` request to the specified URL and exports information about the response.
## Basic Example
```hcl
data "http" "example" {
url = "https://checkpoint-api.hashicorp.com/v1/check/terraform"
# Optional request headers
request_headers = {
Accept = "application/json"
}
}
```
## Configuration Reference
Configuration options are organized below into two categories: required and
optional. Within each category, the available options are alphabetized and
described.
### Required:
@include 'datasource/http/Config-required.mdx'
### Not Required:
@include 'datasource/http/Config-not-required.mdx'
## Datasource outputs
The outputs for this datasource are as follows:
@include 'datasource/http/DatasourceOutput.mdx'