-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
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
HTTP author curl -u support #42
Comments
You must send the |
@elvissstrazdins Thank you very much for your help! |
@elvissstrazdins using your tip above, i wrote the following code: std::vector<std::string> headers;
headers.push_back("Authorization: Basic ZWxhc3RpYzptaW5pVmlkZW9AMTIzNDU2");
const auto response = request.send("GET", "", headers);
std::cout << std::string{response.body.begin(), response.body.end()} << '\n'; the request stuck at this code in your auto count = ::select(endpoint + 1,
(type == SelectType::read) ? &descriptorSet : nullptr,
(type == SelectType::write) ? &descriptorSet : nullptr,
nullptr,
(timeout >= 0) ? &selectTimeout : nullptr); |
HTTPRequest did not pass the port number in the request. This was fixed in cdaa3cd |
I want to write a C++ HTTP client to query ES's RESTful API, but ES has user and password, I do it with curl -u user:password http://xxxx.
The text was updated successfully, but these errors were encountered: