ihp-1.4.0: Haskell Web Framework
Safe HaskellNone
LanguageGHC2021

IHP.Controller.Response

Synopsis

Documentation

respondAndExit :: Response -> IO () Source #

Simple version - just throws the response, no context needed

respondAndExitWithHeaders :: (?request :: Request) => Response -> IO () Source #

Version that adds headers from context (for render, etc.)

addResponseHeaders :: [Header] -> Response -> Response Source #

Add headers to current response | Returns a Response with headers

addResponseHeaders [("Content-Type", "text/html")] response

addResponseHeadersFromContext :: (?request :: Request) => Response -> IO Response Source #

Add headers to current response, getting the headers from the request vault | Returns a Response with headers

addResponseHeadersFromContext response

You probabaly want setHeader