Does casablanca support RFC 2617

Jul 8, 2014 at 11:44 AM
Is casablanca support RFC 2617, Http authorization header?

If so, please share the sample code. I have tried the credentials class object, but it doesn;t help.

Thanks
Palani
Coordinator
Jul 10, 2014 at 12:02 PM
Hi Palani,

Casablanca does support basic authentication on Windows. We do not currently support it on Linux, OSX, etc. What system are you developing for?

Here is some code from one of our tests:
    http_client_config config;
    config.set_credentials(credentials(m_username, m_password));
    http_client client(m_uri, config);
    http_request req(methods::GET);
    req.headers().add(U("UserName"), m_username);
    req.headers().add(U("Password"), m_password);
    http_response response = client.request(req).get();
If you replace m_username, m_password, and m_uri, this should work on windows platforms.

Sincerely,
roschuma
Jul 10, 2014 at 3:41 PM
Thanks, I'm using RHEL 7. May i know do you plan to add support for Linux platforms ?

I was looking for Authentication header in the HTTP with username:password converted to Base64.

Please refer https://casablanca.codeplex.com/workitem/22 at the end.

Thanks
Palani
Coordinator
Jul 10, 2014 at 3:52 PM
We have an issue open for it: https://casablanca.codeplex.com/workitem/89. Please vote for this issue if it's important for your use case.

However, we are not currently working on it. Since Casablanca is open source, it's always possible to add support in yourself; we'll gladly accept contributions.

Sincerely,
roschuma