Created
October 30, 2011 19:20
-
-
Save bvanderveen/1326305 to your computer and use it in GitHub Desktop.
OWIN request BodyDelegate in Environment Dictionary vs. passed to App Delegate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// body-in-env | |
void AppDelegate(IDictionary<string, object> env, Action<string, IDictionary<string, string>, BodyDelegate> result, Action<Error> error) { | |
var requestBody = (BodyDelegate)env["owin.RequestBody"]; | |
... | |
} | |
// body-as-arg | |
void AppDelegate(IDictionary<string, object> env, BodyDelegate requestBody, Action<string, IDictionary<string, string>, BodyDelegate> result, Action<Error> error) { | |
// (requestBody given as an argument) | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment