From 9d2574fa9865f6d6a961cc791855e7db77206eb6 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 5 Dec 2019 16:39:02 -0700 Subject: [PATCH 1/4] added changelog for flux-0.56 --- content/v2.0/reference/release-notes/flux.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index 86cb2af9d..ec7cea829 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -16,6 +16,23 @@ Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} +## v0.56.0 [2019-12-05] + +### Features +- Crate for typing Flux standard library. +- Serialize type environment. +- Improve filter performance when filtering on values. +- Update usage duration test to exclude queue and requeue time. +- Add types for some built-ins. + +### Bug fixes +- Properly use a fake version with `flux-config` when no version is present. +- Address clippy lints. +- Add bytes monotype to Rust semantic module. +- Allow underscores (`_`) in type expressions. + +--- + ## v0.55.1 [2019-12-02] ### Bug fixes From 6d0c74d8ebabf123ff58d2cdc971b095bc23d750 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 5 Dec 2019 16:40:14 -0700 Subject: [PATCH 2/4] new feature on flux-0.56 changelog --- content/v2.0/reference/release-notes/flux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index ec7cea829..d760ea40c 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -24,6 +24,7 @@ InfluxDB until the next InfluxDB v2.0 release._ - Improve filter performance when filtering on values. - Update usage duration test to exclude queue and requeue time. - Add types for some built-ins. +- Add `timeout` parameter to experimental `http.get()`. ### Bug fixes - Properly use a fake version with `flux-config` when no version is present. From dde491ccfe9cd96dcfe8385d8e7c2566e67789ab Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 5 Dec 2019 16:45:31 -0700 Subject: [PATCH 3/4] added timeout parameter to http.get --- .../v2.0/reference/flux/stdlib/experimental/http/get.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 8a3bd0a38..0ee6601e9 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/http/get.md +++ b/content/v2.0/reference/flux/stdlib/experimental/http/get.md @@ -25,7 +25,8 @@ import "experimental/http" http.get( url: "http://localhost:9999/", - headers: {x:"a", y:"b", z:"c"} + headers: {x:"a", y:"b", z:"c"}, + timeout: 30s ) ``` @@ -41,6 +42,12 @@ Headers to include with the GET request. _**Data type:** Object_ +### timeout +Timeout for the GET request. +Default is `30s`. + +_**Data type:** Duration_ + ## Examples ##### Get the status of InfluxDB From 63da1b0703194ab9684ce5e17662c1675a417b1e Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 9 Dec 2019 17:07:31 -0700 Subject: [PATCH 4/4] added details about http.get reponse format --- .../flux/stdlib/experimental/http/get.md | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) 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 0ee6601e9..64094967c 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/http/get.md +++ b/content/v2.0/reference/flux/stdlib/experimental/http/get.md @@ -2,7 +2,7 @@ title: http.get() function description: > The `http.get()` function submits an HTTP GET request to the specified URL and - returns the HTTP status code as an integer and the response body as a byte array. + returns the HTTP status code, response body, and response headers. menu: v2_0_ref: name: http.get @@ -11,7 +11,7 @@ weight: 301 --- The `http.get()` function submits an HTTP GET request to the specified URL and -returns the HTTP status code as an integer and the response body as a byte array. +returns the HTTP status code, response body, and response headers. _**Function type:** Miscellaneous_ @@ -48,6 +48,28 @@ Default is `30s`. _**Data type:** Duration_ +## Response format +`http.get` returns an object that contains the following: + +- [statusCode](#statuscode) +- [body](#body) +- [headers](#headers) + +### statusCode +The HTTP status code returned by the GET request. + +_**Data type:** Integer_ + +### body +The response body. + +_**Data type:** Byte Array_ + +### headers +Headers included with the response. + +_**Data type:** Object_ + ## Examples ##### Get the status of InfluxDB @@ -62,6 +84,7 @@ response = http.get( headers: {Authorization: "Token ${token}"} ) -status = response.statusCode -body = string(v: response.body) +httpStatus = response.statusCode +responseBody = string(v: response.body) +responseHeaders = response.headers ```