Giraffe
Giraffe copied to clipboard
setContentType function
I've found myself searching for a setContentType function, like setStatusCode that is just a functional version of the SetStatusCode extension method on HttpContext.
I couldn't find this one, am I right in thinking it doesn't exist?
If not would you be happy for me open a PR to add it to Core.fs alongside setStatusCode?
I believe the implementation is just
let setContentType contentType : HttpHandler =
fun next ctx ->
ctx.SetContentType contentType
next ctx