Does casablanca support RFC 2617

Jul 8, 2014 at 12:44 PM
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.

Jul 10, 2014 at 1: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.

Jul 10, 2014 at 4: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 at the end.

Jul 10, 2014 at 4:52 PM
We have an issue open for it: 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.