enclose url with params

```
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb" \
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now() - 1d"
```

Running this on ubuntu will get an error: 

```
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb"  --data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
No matches for wildcard “http://localhost:8086/query?pretty=true”.
fish: curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb"  --data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
              ^
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
```

for url here is not enclosed with `'`.
pull/8795/head
silenceshell 2017-09-06 16:10:34 +08:00 committed by GitHub
parent 2f4315ccdf
commit bd61c7ee11
1 changed files with 2 additions and 2 deletions

View File

@ -46,13 +46,13 @@ curl -XPOST 'http://localhost:8086/write?db=mydb' \
### Query for the data
```JSON
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb" \
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" \
--data-urlencode "q=SELECT * FROM cpu WHERE host='server01' AND time < now() - 1d"
```
### Analyze the data
```JSON
curl -G http://localhost:8086/query?pretty=true --data-urlencode "db=mydb" \
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" \
--data-urlencode "q=SELECT mean(load) FROM cpu WHERE region='uswest'"
```