I'm building Git client in MFC Framework, and I am using casablanca library in order to make connections with github server and make an usage of its API. In tutorial for Github one example shows how to send a request to github server with user name and password attached for the purposes of authentication:
https://developer.github.com/v3/#authentication
curl -i https://api.github.com -u valid_username:valid_password
Now, I've tried and tried to achieve the same effect with casablanca from Microsoft but I simply cannot get the syntax right:
http_client client(U("https://api.github.com/users/myuser"));
uri_builder builder(U("- u myuser:mypass"));
pplx::task<http_response> requestTask = client.request(methods::GET, builder.to_string());
After calling this I'm getting exception thrown from casablanca saying that the uri is not valid.
Any idea how to properly construct request in casablanca so I can send it to github server?
Thank you.