Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setContentType function #483

Closed
Choc13 opened this issue Jun 6, 2021 · 1 comment
Closed

setContentType function #483

Choc13 opened this issue Jun 6, 2021 · 1 comment

Comments

@Choc13
Copy link
Contributor

Choc13 commented Jun 6, 2021

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
@esbenbjerre
Copy link
Contributor

@64J0 I believe this issue can be closed.

@nojaf nojaf closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants