title: POST request with cpp-httplib
body: <p>I have found this header only library called <a href="https://github.com/yhirose/cpp-httplib" rel="noreferrer">cpp-httplib</a>, which seems to work fine for my purposes. I need to control a camera through HTTP requests. For example, I can read the current position of the camera using:</p>
  
  <pre><code>httplib::Client cli("192.170.0.201", 8080);
  auto res = cli.Get("/ptz.stats/present_pos");
  </code></pre>
  
  <p>which corresponds to the following Curl command;</p>
  
  <blockquote>
    <p>curl -X GET "<a href="http://192.170.0.201:8080/ptz.stats/present_pos" rel="noreferrer">http://192.170.0.201:8080/ptz.stats/present_pos</a>"</p>
  </blockquote>
  
  <p>Now, I want to move the camera using a POST request. With curl, I can use following command to move the camera to left:</p>
  
  <blockquote>
    <p>curl -X POST "<a href="http://192.170.0.201:8080/ptz.cmd/?pan_left=50" rel="noreferrer">http://192.170.0.201:8080/ptz.cmd/?pan_left=50</a>"</p>
  </blockquote>
  
  <p>I want to make the exact same POST request from <code>httplib</code> using</p>
  
  <pre><code>httplib::Client cli("192.170.0.201", 8080);
  httplib::Params params{
    { "pan_left", "50" }
  };
  auto p = cli.Post("/ptz.cmd", params);
  </code></pre>
  
  <p>and this does nothing. I can see the camera and that curl command moves it. So, am I translating the POST request to <code>httplib</code> format in a wrong way? How would you call that curl request in <code>httplib</code>?</p>
  
  <p>PS: <code>httplib</code> might not be a popular library but it has neat documentation and I think anyone working with web requests and C++ can help. </p>