diff --git a/content/v2.0/reference/flux/stdlib/experimental/http/_index.md b/content/v2.0/reference/flux/stdlib/experimental/http/_index.md index 4be46b606..d56bfae6a 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/http/_index.md +++ b/content/v2.0/reference/flux/stdlib/experimental/http/_index.md @@ -2,8 +2,8 @@ title: Flux HTTP package list_title: HTTP package description: > - The Flux Experimental HTTP package provides experimental functions for transferring - data using the HTTP protocol. + The Flux Experimental HTTP package provides functions for transferring data + using HTTP protocol. Import the `experimental/http` package. menu: v2_0_ref: @@ -14,8 +14,8 @@ weight: 201 v2.0/tags: [functions, http, package] --- -The Flux Experimental HTTP package provides experimental functions for transferring -data using the HTTP protocol. +The Flux Experimental HTTP package provides functions for transferring data +using HTTP protocol. {{% warn %}} The experimental HTTP package is subject to change at any time. diff --git a/content/v2.0/reference/flux/stdlib/experimental/http/get.md b/content/v2.0/reference/flux/stdlib/experimental/http/get.md index cec408c10..25e5a7c80 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/http/get.md +++ b/content/v2.0/reference/flux/stdlib/experimental/http/get.md @@ -38,6 +38,7 @@ _**Data type:** String_ ### headers Headers to include with the GET request. +Headers are represented by key-value pairs. _**Data type:** Object_ @@ -45,11 +46,14 @@ _**Data type:** Object_ ##### Get the status of InfluxDB ```js +import "influxdata/influxdb/secrets" import "experimental/http" +token = secrets.get(key: "READONLY_TOKEN") + response = http.get( url: "http://localhost.com:9999/health", - headers: {} + headers: {Authorization: "Token ${token}"} ) status = string(v: response.statusCode)