Open Tronikelis opened 1 year ago
@trezm and I am confused about the headers and cookies, I have some suggestions:
I think clear differentiation between request and response variables is needed
So something like this:
// from
context.set("foo", "bar");
// to
context.set_header("foo", "bar");
// from
context.cookie("foo", "bar", &CookieOptions::default());
// to
context.set_cookie("foo", "bar", &CookieOptions::default());
// from
context.headers;
// to
context.res_headers;
// I am confused about the methods below,
// the `context.cookie()` sets the header and thats it
// so these methods won't return anything?
// from
context.get_cookies();
// to
context.get_res_cookies();
// not sure what this does
context.set_cookies(cookies);
Hi, how do I read the headers and the cookies from the response?
I am testing a middleware that needs cookies like this:
And I am printing out everything like this:
But every one of those 3 variables return empty: