Skip to content

Instantly share code, notes, and snippets.

@mathieugarcia
Created May 14, 2018 13:14
Show Gist options
  • Save mathieugarcia/a68bc53ff078d4e4151cb21af0882384 to your computer and use it in GitHub Desktop.
Save mathieugarcia/a68bc53ff078d4e4151cb21af0882384 to your computer and use it in GitHub Desktop.
Utility function to create a new HTTPRequest
template <typename DoneLambda, typename ErrorLambda>
auto MakeHTTPRequest(const std::string& rURL,
DoneLambda&& d,
ErrorLambda&& e)
-> HTTPRequest<DoneLambda, ErrorLambda>
{
return { rURL,
std::forward<DoneLambda>(d),
std::forward<ErrorLambda>(e)
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment