Skip to content

Is there a way to access ReqData<T> from middleware? #3437

Closed Answered by robjtede
tyrsday29 asked this question in Q&A
Discussion options

You must be logged in to vote

Possible it's being set at an inner layer to the middleware being run. All handlers are run after middleware, but middleware registration order matters in this way. For example:

.wrap(A) // <- sets req data
.wrap(B) // <- outer layer ("wraps" things before it); can't access req data
.wrap(B) // <- can access req data
.wrap(A) // <- sets req data

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by robjtede
Comment options

You must be logged in to vote
0 replies
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