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
{{ message }}
This repository was archived by the owner on Dec 8, 2018. It is now read-only.
In Nancy you can implement a IStatusCodeHandler which has CanHandle and a Handle methods. CanHandle returns a boolean that says for this statuscode I can handle it and then in the Handle it writes a response.
In UseStatusCodePages it seems to be a global filter for status codes. How do I say only execute x when the statuscode is y. Only examples I have seen is to write a Controller method that has a switch statement on the statuscode and that is very ugly.
Is there a cleaner way of doing it? If not could we make it cleaner?
The text was updated successfully, but these errors were encountered:
In Nancy you can implement a
IStatusCodeHandler
which has CanHandle and a Handle methods. CanHandle returns a boolean that says for this statuscode I can handle it and then in the Handle it writes a response.In UseStatusCodePages it seems to be a global filter for status codes. How do I say only execute
x
when the statuscode isy
. Only examples I have seen is to write a Controller method that has a switch statement on the statuscode and that is very ugly.Is there a cleaner way of doing it? If not could we make it cleaner?
The text was updated successfully, but these errors were encountered: