getRouteParam :: forall e a. (RequestParam a) => a -> HandlerM (express :: EXPRESS | e) (Maybe String)
Get route param value. If it is named route, e.g /user/:id
then
getRouteParam "id"
return matched part of route. If it is
regex route, e.g. /user/(\d+)
then getRouteParam 1
return
part that matched (\d+)
and getRouteParam 0
return whole
route.
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) String
Return 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 e
Execute 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) Boolean
Check if request's Content-Type field matches type. See http://expressjs.com/4x/api.html#req.is
getRemoteIp :: forall e. HandlerM (express :: EXPRESS | e) String
Return 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) String
Return request URL pathname.
getHostname :: forall e. HandlerM (express :: EXPRESS | e) String
Return Host header field.
getSubdomains :: forall e. HandlerM (express :: EXPRESS | e) (Array String)
Return array of subdomains.
isFresh :: forall e. HandlerM (express :: EXPRESS | e) Boolean
Check that Last-Modified and/or ETag still matches.
isStale :: forall e. HandlerM (express :: EXPRESS | e) Boolean
Check that Last-Modified and/or ETag do not match.
isXhr :: forall e. HandlerM (express :: EXPRESS | e) Boolean
Check 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) String
Return request URL (may be modified by other handlers/middleware).
getOriginalUrl :: forall e. HandlerM (express :: EXPRESS | e) String
Return request original URL.