title: libcurl http get request in json format
body: <p>Is there a way to send a HTTP get request using libcurl in JSON format?</p>
  
  <p>My current request is </p>
  
  <p><code>curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost:9200/_search?q=tag:warcraft")</code></p>
  
  <p>using libcurl. It's equivalent in curl is</p>
  
  <pre><code>curl -XGET http://localhost:9200/_all/tweet/_search?q=tag:warcraft
  </code></pre>
  
  <p>I would like to send the following curl request (in json format) using libcurl.</p>
  
  <pre><code>curl -XGET http://localhost:9200/_search -d '{
      "query" : {
          "term" : { "tag": "warcraft" }
      }
  }'
  </code></pre>
  
  <p>I would like to know the equivalent libcurl code to send the above request. Thanks.</p>