Skip to content

Accessing request & response in the handler #925

Answered by RobinTail
JUNIORCO asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @JUNIORCO ,

Take a look on the first example of Middlewares in the documentation:

https://github.com/RobinTail/express-zod-api#middlewares

Thus, you can make your endpoint handler aware of certain properties of request via options.

For redirecting you should make a ResultHandler, which has direct access to request and response.

By the way, there was another discussion on Cookies. Check this out:
#710 (comment)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants