-
Notifications
You must be signed in to change notification settings - Fork 15
Getting the Request server side #28
Comments
Any news on this ? |
Any news please ? |
Hey Radouane It's a good idea to take a look at the first image in this issue: angular/angular#22443 There you can see that there are two types of requests and responses: 1.) Step 1 and 6, made from the end user/client to the Java web server and back Now this results in a problem where the two requests/responses don't share their data, means: A cookie received by the web server won't be passed down to the J2V8 Node.js requests and their responses won't be updated/merged with the Java response to the end user. Using I asked in angular/universal#1000 if there is such a feature (Sadly there isn't) and at the moment I just don't have the time and resources to write one by myself (I guess I have to do it after Christman and before New Year). So at the moment I can't offer you a fix/solution :/ |
Thank you for the detail. I didn't succeed to find any workaround, I will wait your future work. Regards. |
Hi @swaechter, Happy new year :) ! Do you had time to work on this thread ? Thank you, |
Hi Simon,
Hope you're doing well.
Do you had time to work on this thread!?
Thank you.
Le dim. 18 nov. 2018 à 09:58, Simon Wächter <[email protected]> a
écrit :
… Hey Radouane
It's a good idea to take a look at the first image in this issue:
angular/angular#22443 <angular/angular#22443>
There you can see that there are two types of requests and responses:
1.) Step 1 and 6, made from the end user/client to the Java web server and
back
2.) Step 4 or in general requests done in the J2V8 Node.js instance
Now this results in a problem where the two requests/responses don't share
their data, means: A cookie received by the web server won't be passed down
to the J2V8 Node.js requests and their responses won't be updated/merged
with the Java response to the end user.
Using express-engine/tokens to parse/read/update cookies won't solve this
problem - we simply need a bridge to pass down/up all headers (and
thereforce values like session ID and cookies).
I asked in angular/universal#1000
<angular/universal#1000> if there is such a
feature (Sadly there isn't) and at the moment I just don't have the time
and resources to write one by myself (I guess I have to do it after
Christman and before New Year). So at the moment I can't offer you a
fix/solution :/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARGBj6jUFjFh-8O_me_NlT7dvQoRlGMCks5uwSE6gaJpZM4W-CoK>
.
|
Hey not yet, but the new TCP solution uses the official Angular Universal interface/library now. So it might be a good idea to propose more sophisticated features on the official project there:
You can find the thread here: angular/universal#1000 |
Hi, It seems that socket-engine does not support getting request server side actually. I created this feature angular/universal#1136 For now, I want to know if is there any fast way to get the cookie server side using socket-engine or the previous registerRenderAdapter. I don't know v8 well, it would be nice if you can show me where I can do the evolution. |
Yes, that's more or less the problem. A working solution for 1.) Get all cookie values via the Spring Boot/servlet cookie API and store them in a map Caveats: It's not possible to "simulate" cookie values with a set At the moment I just don't have the time to tinker around with 3 - 5 (1, 2, 6 and 7 should be quite easy to accomplish). |
Hi, I implemented the solution for v8. In back-end server, i fetch the request context that i inject to the angular as below :
I can then retieve the context using injector
It's works well. I will migrate to TCP solution once it's mature. Thank you for your help. |
I need to get the request header server side, in my app.component. I tried the code below but does not work.
I also tried with
injector. injector.get(REQUEST);
The text was updated successfully, but these errors were encountered: