Skip to content

Instantly share code, notes, and snippets.

@mathieugarcia
Last active May 16, 2018 06:28
Show Gist options
  • Save mathieugarcia/2522dd5fdc5f2ec898e56345b314150d to your computer and use it in GitHub Desktop.
Save mathieugarcia/2522dd5fdc5f2ec898e56345b314150d to your computer and use it in GitHub Desktop.
HTTPRequest usage example
MakeHTTPRequest("https://jsonplaceholder.typicode.com/users",
[=](std::unique_ptr<char[]> data, size_t len)
{
// Parse the data here
},
[=](const auto& err) // Error
{
// Warn user, log console...
})(); // <--- Note the (): we're calling operator()() to execute it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment