Module

HTTPurple.Request

Package
purescript-httpurple
Repository
sigma-andex/purescript-httpurple

#Request Source

type Request route = { body :: RequestBody, headers :: RequestHeaders, httpVersion :: Version, method :: Method, path :: Path, query :: Query, route :: route, url :: String }

The Request type is a Record type that includes fields for accessing the different parts of the HTTP request.

#fromHTTPRequest Source

fromHTTPRequest :: forall route. RouteDuplex' route -> Request -> Aff (Either (Request Unit) (Request route))

Given an HTTP Request object, this method will convert it to an HTTPurple Request object.

#fullPath Source

fullPath :: forall route. Request route -> String

Return the full resolved path, including query parameters. This may not match the requested path--for instance, if there are empty path segments in the request--but it is equivalent.