-
Notifications
You must be signed in to change notification settings - Fork 221
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
Header-Endpoint that only matches specific values, akin to path #983
Comments
Perhaps |
@d-s-d Let me know if you're willing to contributed this new endpoint instance and I will move the ticket to appropriate milestone. |
@vkostyukov Ok. I'm new to this. Till when would you like to see a PR? |
There is no deadline whatsoever. Whenever you have time. |
@vkostyukov @d-s-d |
@sergeykolbasov That is the point, I think. Similar to the path, this endpoint can be used to dispatch a request. Maybe a different name would do: |
It would be convenient to have a header-endpoint that matches iff a header is present with a particular value. This is useful in situations where one wants to provide different business logic depending on that value. An example of this is API-Versioning: Let's assume that such an endpoint-factory would exist and
header(x, y)
matched iff headerx
was present with valuey
. Then one could solve this problem as follows:The text was updated successfully, but these errors were encountered: