-
Notifications
You must be signed in to change notification settings - Fork 200
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 object not getting modified #531
Comments
This code is server side. |
Hi!! @H1Gdev Yes, the code is server side. Actually, here some values are attached to the request object after the req comes from the client side before actual processing is done. Here frisby is used for checking the server side only. You can take a look at the codebase here, if it helps. Thank You!! so much |
Are you sending the appropriate headers with JWT tokens from Frisby also? |
Yeah, it's the exact same as I use on my frontend calls.😅 |
On the front-end, the browser is probably forwarding along cookies that have been set after you login. In Frisby, you have to set these yourself manually. Have you done that? |
Hi @vlucas If I am ryt, cookies won't make any difference in this request(We don't use cookies in this component of the project). |
Following, I'm also having the same problem. I can only attach things under |
Oh I see. So this is code in Express.js that is somehow not working properly when hitting the API endpoint with Frisby.js? It seems pretty unlikely that Frisby.js itself would be the cause. Are you able to replicate this with another tool like Curl, HTTPie or RequestBin? Frisby does not automatically save and re-use cookies from previous requests, so that might be the root issue here... |
I have a middleware which attaches a UserId to the request object.(similar to the explanation in https://stackoverflow.com/questions/12518132/modifying-express-js-request-object) It functions properly while using the application. But while running frisby the request object is not getting modified.
Following is the middleware I used:
Expected Terminal Output:
Present Terminal Output:
The text was updated successfully, but these errors were encountered: