ContentsIndex
Framework.Http.Response
Description
Utility functions to form HTTP response
Synopsis
response :: Int -> [Header] -> String -> HttpResponse
ok :: String -> HttpResponse
redirect :: String -> HttpResponse
redirectG :: String -> [UrlParam] -> HttpResponse
redirectP :: String -> HttpResponse
(<+>) :: HttpResponse -> Header -> HttpResponse
(<++>) :: HttpResponse -> [Header] -> HttpResponse
Documentation
response
:: IntHTTP status code
-> [Header]HTTP headers
-> StringResponse body
-> HttpResponse
Generic response
ok :: String -> HttpResponse
HTTP 200 OK response with given body (text/html)
redirect :: String -> HttpResponse
HTTP 302 redirect response with given text
redirectG
:: StringResponse body
-> [UrlParam]Parameters for URL
-> HttpResponse
Generic 302 redirect
redirectP :: String -> HttpResponse
HTTP 301 redirect response with given text
(<+>) :: HttpResponse -> Header -> HttpResponse
Add HTTP header to response
(<++>) :: HttpResponse -> [Header] -> HttpResponse
Add list of HTTP headers to response
Produced by Haddock version 2.4.2