title: Http_client post request using C++ REST SDK (Casablanca)
body: <p>I'm trying to perform a POST HTTP request using C++ REST SDK (Casablanca) library, but I'm not succeeding... Nor I can find any recent/working snippet.
  Can anybody help me?</p>
  
  <p>With my following code I obtain a runtime <em>web::json::json_exception</em> saying "not a string":</p>
  
  <pre><code>json::value postData;
  postData[L"name"] = json::value::string(L"Joe Smith");
  postData[L"sport"] = json::value::string(L"Baseball");
  
  web::http::client::http_client client(L"https://jsonplaceholder.typicode.com/posts");
  
  try
  {
      client.request(
          methods::POST,
          L"",
          postData/*.as_string().c_str()*/,
          L"application/json");
  }
  catch (web::json::json_exception &amp;je)
  {
      std::cout &lt;&lt; je.what();
  }
  catch (std::exception &amp;e)
  {
      std::cout &lt;&lt; e.what();
  }
  </code></pre>