2015-09-22 97 views
0

我得到這個CURL命令的錯誤,而同樣的作品在Chrome DHC應用程序。缺少什麼我在這裏捲曲查詢參數獲得

[[email protected]]# curl -sk -X 'GET' -H 'X-Auth-Token: 5ce0efd401d54afab3a2bee022013b87' -H 'Content-type: application/json' https://10.1.1.132/rest/rm-central/v1/recovery-sets?query="volumeType EQ 'vvol'" 
{"badRequest": {"message": "QueryFilter Error :: Given Query Filter syntax 'query=' is not valid ", "code": 400}} 
[[email protected]]# 
[[email protected]]# 
[[email protected]]# 
+0

大概是'或者beeing之前刪除「發送到服務器 –

回答

0

您的網址似乎是錯誤的:

https://10.1.1.132/rest/rm-central/v1/recovery-sets?query="volumeType EQ 'vvol'" 

尤其是query=部分。

的報價應該是這樣的:

'https://10.1.1.132/rest/rm-central/v1/recovery-sets?query=foobar' 

或 「雙引號」

0

下面捲曲語法解決我的問題:

# curl -k -G -X 'GET' -H 'X-Auth-Token: 5127af39b7584d8c8897a0cad55accdc' -H 'Content-type: application/json' https://10.1.1.132/rest/rm-central/v1/recovery-sets -d "query=\"volumeType%20EQ%20'vvol'\""