From bd61c7ee1139962f4b2c4191808e63b863243c39 Mon Sep 17 00:00:00 2001 From: silenceshell Date: Wed, 6 Sep 2017 16:10:34 +0800 Subject: [PATCH] enclose url with params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` 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 `'`. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf301c3d6d..ec507a3314 100644 --- a/README.md +++ b/README.md @@ -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'" ```