Differences between returning None
and Some httpCtx
from Giraffe middlewares
#659
64J0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, I came up with this example for the differences between returning
None
andSome httpCtx
in a Giraffe middleware:The project code (
Program.fs
):To use it locally, after starting the server:
After starting this project locally, if you go through the "Return early" path (
Some httpCtx
), everything works fine. But, if you go through the "Skip" path (None
), the server raises an exception (more details in the mw2 code).More details about "Return early" and "Skip" here: link.
Beta Was this translation helpful? Give feedback.
All reactions