Hi All,
I am using libcurl to add indices and retrieve search results. I would like
to know whether there is a way to send http get requests using libcurl in
json format?
For example, the request in curl is
curl -XGET http://localhost:9200/_all/tweet/_search?q=tag:warcraft
Its equivalent in libcurl is
curl_easy_setopt(curl_handle, CURLOPT_URL,
"http://localhost:9200/_search?q=tag:warcraft")
I would like to send the above request in json format (below).
curl -XGET http://localhost:9200/_search -d '{ "query" : { "term" : { "tag": "warcraft" } } }'
Is there a way to do this?
--
c - libcurl http get request in json format - Stack Overflow in
case if anyone's interested.
On Monday, November 5, 2012 12:28:57 PM UTC-5, Dinesh Sriram wrote:
Hi All,
I am using libcurl to add indices and retrieve search results. I would
like to know whether there is a way to send http get requests using libcurl
in json format?
For example, the request in curl is
curl -XGET http://localhost:9200/_all/tweet/_search?q=tag:warcraft
Its equivalent in libcurl is
curl_easy_setopt(curl_handle, CURLOPT_URL, "
http://localhost:9200/_search?q=tag:warcraft")
I would like to send the above request in json format (below).
curl -XGET http://localhost:9200/_search -d '{ "query" : { "term" : { "tag": "warcraft" } } }'
Is there a way to do this?
--