Module
Node.Express.Response
- Package
- purescript-express
- Repository
- nkly/purescript-express
#getResponseHeader Source
getResponseHeader :: String -> HandlerM (Maybe String)
Return response header value.
#setResponseHeader Source
setResponseHeader :: forall a. String -> a -> Handler
Set response header value.
#headersSent Source
headersSent :: HandlerM Boolean
Check if headers have been sent already
#setContentType Source
setContentType :: String -> Handler
Set Content-Type header.
#setCookie Source
setCookie :: String -> String -> CookieOptions -> Handler
Set cookie by its name using specified options (maxAge, path, etc).
#redirectWithStatus Source
redirectWithStatus :: Int -> String -> Handler
Redirect to the given URL using custom status.
#setLocation Source
setLocation :: String -> Handler
Set Location header.
#sendFileExt Source
sendFileExt :: forall o. String -> Record o -> (Error -> Effect Unit) -> Handler
Send file by its path using specified options and error handler. See http://expressjs.com/4x/api.html#res.sendfile