How to PUT a serialized JSON?

Aug 2, 2013 at 9:19 AM
Looking for an example to do the above?
Aug 2, 2013 at 4:10 PM
Edited Aug 2, 2013 at 4:20 PM
Here's an example from the unit tests:
    http_client client(m_uri);
    
    // JSON bool value.
    json::value bool_value = json::value::boolean(true);
    client.request(methods::PUT, U("/"), bool_value).get();
Of course, the .get() call makes it all synchronous, so you probably want to rely on .then() (see Programming with Tasks) in your code, instead. Asynchrony is one of the main points of Casablanca, after all.

I would also like to encourage you to take a look at the Casablanca How-to Guides.