-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
request.state is empty when server rendering #2970
Comments
Where do you set the cookie? |
I set a cookie like this: The route:
On the client side:
These are the current settings:
The cookie is being set without a problem, and I am able to retrieve it whenever I want as long as it is on the client side. The issue is when I am server rending my web page. |
You do know that when you send the request from a non-browser client you need to manually add a Cookie header, right? |
I remember reading about that somewhere; however, I do not know how to retrieve the cookie data and add it to a Cookie header. EDIT:
How do I retrieve the cookie information that is stored in the client and put it inside the header? I am passing the
However, Shouldn't the request object on the |
The |
if I manually set the cookie header in a rest call request; headers: {'Cookie': 'foo=bar'} then on the server side shouldn't request.state('foo') find 'bar' ? finding that its empty :( |
I have been trying to figure this one out for the last couple of days, but I just gave up. For some reason, when I server render my web page,
request.state
is emtpy; however, when I call the same code on the client side, therequest.state
shows the cookie.This is the code I am using for calling the route:
And this is my route:
That same code works when called from the client side.
What am I missing?
The text was updated successfully, but these errors were encountered: