github.com/hashicorp/packer@v1.14.3/website/content/docs/datasources/http.mdx (about)

     1  ---
     2  description: |
     3    The `http` data source makes an HTTP `GET` request to the specified URL and exports information about the response.
     4  page_title: http data source reference
     5  ---
     6  
     7  <BadgesHeader>
     8    <PluginBadge type="official" />
     9    <PluginBadge type="hcp_packer_ready" />
    10  </BadgesHeader>
    11  
    12  # `http`
    13  
    14  The `http` data source makes an HTTP `GET` request to the specified URL and exports information about the response.
    15  
    16  
    17  ## Basic Example
    18  
    19  ```hcl
    20  data "http" "example" {
    21    url = "https://checkpoint-api.hashicorp.com/v1/check/terraform"
    22  
    23    # Optional request headers
    24    request_headers = {
    25      Accept = "application/json"
    26    }
    27  }
    28  ```
    29  
    30  ## Configuration Reference
    31  
    32  Configuration options are organized below into two categories: required and
    33  optional. Within each category, the available options are alphabetized and
    34  described.
    35  
    36  ### Required:
    37  
    38  @include 'datasource/http/Config-required.mdx'
    39  
    40  ### Not Required:
    41  @include 'datasource/http/Config-not-required.mdx'
    42  
    43  ## Datasource outputs
    44  
    45  The outputs for this datasource are as follows:
    46  
    47  @include 'datasource/http/DatasourceOutput.mdx'