从Powershell发出包含主体的GET Web请求

时间:2018-06-28 21:57:44

标签: rest powershell elasticsearch

我正在尝试使用UPDATE t SET col2 = 'No' FROM someTable t JOIN someTable t2 ON t.col1 = t2.col1 AND t2.col2 = 'Yes' WHERE t.col2 IS NULL 从PowerShell查询Elasticsearch。 Elasticsearch要求GET请求具有Invoke-WebRequest禁止的正文。是否有解决方法?也许其他允许这个的程序? POSIX上的iwr允许这样做。我知道这不是标准的,但是请与Elasticsearch一起使用。

这是我尝试过的:

curl

此返回: Invoke-WebRequest http://localhost:9200/index* -Body '{ "size": 1, "sort": [ { "timestamp": {"order": "asc"}} ], "query": { <query here> } }' -Method GET

谢谢。

0 个答案:

没有答案