-
Notifications
You must be signed in to change notification settings - Fork 95
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
Impossible to access all Set-Cookie
headers
#37
Comments
I just found that restbed has a http client (this is my workaround). std::string uri {"http://localhost/test"};
std::string body {"{\"foo\":\"bar\"}"}
auto request = std::make_shared<restbed::Request>(restbed::Uri{uri});
request->set_method("POST");
request->set_headers({{"Content-Length", std::to_string(body.size())}});
request->set_body(body);
auto response {restbed::Http::sync(request)};
auto cookieHeaders {response->get_headers("Set-Cookie")};
std::string responseBody {
restbed::String::to_string(
restbed::Http::fetch(
std::stoi(response->get_header("Content-Length")),
response
)
)
}; |
I have not implemented dedicated support for cookies yet. It will be done soon. The last few weeks I have worked on another project, including some Jenkins CI work. |
I haven't asked support for cookies. It's just an example of multi-header value. |
Yes, I'll fix that as well :) |
In response I have multiple cookies but
Reply::GetHeader(name)
returns only the last header with the give namerestc-cpp/include/restc-cpp/restc-cpp.h
Lines 226 to 228 in 6398d70
Until this will be fixed, any workaround?
The text was updated successfully, but these errors were encountered: