I tried response.headers["set-cookie"] but it only returns one value. It seems to be calling http::header::map::HeaderMap::get. How do I make it call http::header::map::HeaderMap::get_all?
Full code:
fn subgraph_service(service, subgraph) {
let store_cookies_from_subgraphs = |response| {
if response.headers["set-cookie"] != () {
if response.context["set_cookie_headers"] == () {
response.context.set_cookie_headers = [];
}
response.context.set_cookie_headers += response.headers["set-cookie"];
}
};
service.map_response(store_cookies_from_subgraphs);
}