We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//Basic Authorization Setting http_client_config config; credentials creds(L"name", L"password"); config.set_credentials(creds); http_client client(U("http://severip/"), config); // create header http_request req(methods::GET); //// Add base64 result to header req.headers().add(L"Authorization", L"Basic bmFtZTpwYXNzd29yZA"); pplx::task<http_response> responses = client.request(req); pplx::task<web::json::value> jvalue = responses.get().extract_json(); web::json::value v = jvalue.get(); utility::string_t jsonval = v.serialize(); wcout << jsonval << endl; //with base64 encoding. //bmFtZTpwYXNzd29yZA = name:password
I'm trying to set a credentials through cpprestsdk aka casablanca.
And I've received 401 error which is failed to authenticate user, it means password error.
The server where I wanna send a query is elastic-search's cluster.
Any advice would be thankful.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to set a credentials through cpprestsdk aka casablanca.
And I've received 401 error which is failed to authenticate user, it means password error.
The server where I wanna send a query is elastic-search's cluster.
Any advice would be thankful.
The text was updated successfully, but these errors were encountered: