Created
May 1, 2014 18:28
-
-
Save bjartwolf/a5c58e9e9cfee8e40c62 to your computer and use it in GitHub Desktop.
contentnegotiation
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
public async Task Invoke(IDictionary<string, object> env) | |
{ | |
var ctx = new OwinContext(env); | |
var accepts = ctx.Request.Accept; | |
if (accepts != null && accepts == accepts.ToUpper()) | |
{ | |
ctx.Response.Body = new CapsStream(ctx.Response.Body); | |
} | |
await next(env); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment