Merge pull request #663 from influxdata/flux-0.56

Flux 0.56
pull/669/head
Scott Anderson 2019-12-11 09:28:27 -07:00 committed by GitHub
commit 170bdcc33a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 5 deletions

View File

@ -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_
@ -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,34 @@ Headers to include with the GET request.
_**Data type:** Object_
### timeout
Timeout for the GET request.
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
@ -55,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
```

View File

@ -16,6 +16,24 @@ 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.
- Add `timeout` parameter to experimental `http.get()`.
### 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