data HandlerM e aMonad responsible for handling single request.
instance functorHandlerM :: Functor (HandlerM e)
instance applyHandlerM :: Apply (HandlerM e)
instance applicativeHandlerM :: Applicative (HandlerM e)
instance bindHandlerM :: Bind (HandlerM e)
instance monadHandlerM :: Monad (HandlerM e)
instance monadEffHandlerM :: MonadEff eff (HandlerM eff)
instance monadAffHandlerM :: MonadAff eff (HandlerM eff)type Handler e = HandlerM (express :: EXPRESS | e) UnitrunHandlerM :: forall e. Handler e -> Request -> Response -> ExpressM e Unit -> ExpressM e Unitnext :: forall e. Handler eCall next handler/middleware in a chain.
nextThrow :: forall e a. Error -> HandlerM (express :: EXPRESS | e) aCall next handler/middleware and pass error to it.
getRouteParam :: forall e a. (RequestParam a) => a -> HandlerM (express :: EXPRESS | e) (Maybe String)getBodyParam :: forall e a. (IsForeign a) => String -> HandlerM (express :: EXPRESS | e) (Maybe a)Get param from request's body. NOTE: Not parsed by default, you must attach proper middleware See http://expressjs.com/4x/api.html#req.body
getQueryParam :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Get param from query string (part of URL behind '?'). If there are multiple params having equal keys return the first one.
getQueryParams :: forall e. String -> HandlerM (express :: EXPRESS | e) (Array String)Get all params from query string having specified key.
getRoute :: forall e. HandlerM (express :: EXPRESS | e) StringReturn route that matched this request.
getCookie :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Get cookie param by its key.
getSignedCookie :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Get signed cookie param by its key.
getRequestHeader :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Get request header param.
accepts :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Check if specified response type will be accepted by a client.
ifAccepts :: forall e. String -> Handler e -> Handler eExecute specified handler if client accepts specified response type.
acceptsCharset :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Check if specified charset is accepted.
acceptsLanguage :: forall e. String -> HandlerM (express :: EXPRESS | e) (Maybe String)Check if specified language is accepted.
hasType :: forall e. String -> HandlerM (express :: EXPRESS | e) BooleanCheck if request's Content-Type field matches type. See http://expressjs.com/4x/api.html#req.is
getRemoteIp :: forall e. HandlerM (express :: EXPRESS | e) StringReturn remote or upstream address.
getRemoteIps :: forall e. HandlerM (express :: EXPRESS | e) (Array String)Return list of X-Forwarded-For proxies if any.
getPath :: forall e. HandlerM (express :: EXPRESS | e) StringReturn request URL pathname.
getHostname :: forall e. HandlerM (express :: EXPRESS | e) StringReturn Host header field.
getSubdomains :: forall e. HandlerM (express :: EXPRESS | e) (Array String)Return array of subdomains.
isFresh :: forall e. HandlerM (express :: EXPRESS | e) BooleanCheck that Last-Modified and/or ETag still matches.
isStale :: forall e. HandlerM (express :: EXPRESS | e) BooleanCheck that Last-Modified and/or ETag do not match.
isXhr :: forall e. HandlerM (express :: EXPRESS | e) BooleanCheck if request was issued by XMLHttpRequest.
getProtocol :: forall e. HandlerM (express :: EXPRESS | e) (Maybe Protocol)Return request protocol.
getMethod :: forall e. HandlerM (express :: EXPRESS | e) (Maybe Method)Return request HTTP method
getUrl :: forall e. HandlerM (express :: EXPRESS | e) StringReturn request URL (may be modified by other handlers/middleware).
getOriginalUrl :: forall e. HandlerM (express :: EXPRESS | e) StringReturn request original URL.
setStatus :: forall e. Int -> Handler egetResponseHeader :: forall e a. (IsForeign a) => String -> HandlerM (express :: EXPRESS | e) (Maybe a)Return response header value.
setResponseHeader :: forall e a. String -> a -> Handler eSet response header value.
headersSent :: forall e. HandlerM (express :: EXPRESS | e) BooleanCheck if headers have been sent already
setCookie :: forall e. String -> String -> CookieOptions -> Handler eSet cookie by its name using specified options (maxAge, path, etc).
clearCookie :: forall e. String -> String -> Handler eClear cookie.
send :: forall e a. a -> Handler eSend a response. Could be object, string, buffer, etc.
sendJson :: forall e a. a -> Handler eSend a JSON response. Necessary headers are set automatically.
sendJsonp :: forall e a. a -> Handler eSend a JSON response with JSONP support.
redirect :: forall e. String -> Handler eRedirect to the given URL setting status to 302.
redirectWithStatus :: forall e. Int -> String -> Handler eRedirect to the given URL using custom status.
setLocation :: forall e. String -> Handler eSet Location header.
setContentType :: forall e. String -> Handler eSet Content-Type header.
sendFile :: forall e. String -> Handler eSend file by its path.
sendFileExt :: forall e o. String -> { | o } -> (Error -> ExpressM e Unit) -> Handler eSend file by its path using specified options and error handler. See http://expressjs.com/4x/api.html#res.sendfile
download :: forall e. String -> Handler eTransfer file as an attachment (will prompt user to download).
downloadExt :: forall e. String -> String -> (Error -> ExpressM e Unit) -> Handler eTransfer file as an attachment using specified filename and error handler.