使用httr,我将如何执行等效的
curl -XGET 'http://foo/bar/_search?pretty' -d '{
"query": {
"filtered": {
...
}
}
}'
(并且响应是JSON编码的)。
以下失败
f <- GET("http://foo/bar/_search",query=list(Q))
其中Q是在-d。
之后传递的上述JSON参数谢谢