You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validation is HTTP verb agnostic, so the above example would need to be repeated for all verbs.
It would be great to have a convenience method for such cases (e.g .any() or for the .intercept() method to accept an array of verbs as the second argument).
Alternatives
Yes, here is the implementation I'm currently using:
Please avoid duplicates
Context
I came across a situation where I needed to validate a certain header before all requests and respond with a
400
if the validation failed.The validation is HTTP verb agnostic, so the above example would need to be repeated for all verbs.
It would be great to have a convenience method for such cases (e.g
.any()
or for the.intercept()
method to accept an array of verbs as the second argument).Alternatives
Yes, here is the implementation I'm currently using:
It works just fine, but it would be great to have a convenience method for this. I'd be happy to submit a PR for it.
If the feature request is accepted, would you be willing to submit a PR?
The text was updated successfully, but these errors were encountered: