| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Nero.Request
Request
An HTTP Request.
Instances
| Eq Request | |
| Show Request | |
| Param Request | It traverses the values with the same key both in the query string
and the form encoded body of a |
| Formed Request | |
| HasBody Request | |
| HasQuery Request | |
| HasPath Request | |
| HasHost Request | |
| HasUrl Request | |
| Server (Request -> Maybe Response) | |
| Server (Request -> Response) |
method :: Request -> ByteString Source
Show Request method.
params :: Traversal' Request MultiMap Source
This Traversal lets you traverse every HTTP parameter regardless of
whether it's present in the query string or in the form encoded body
of a POST Request. In the rare case where there are HTTP parameters in
both, every parameter is still being traversed starting from the /query
string/.
You might want to use param for traversing a specific parameter.
>>>let request = dummyRequestForm & query . at "name" ?~ ["hello", "out"] & form . at "name" ?~ ["there"]>>>foldOf params request ^? ix "name"Just ["hello","out","there"]
GET
A GET Request.
POST
A POST Request.
Testing
dummyRequest :: Request Source
An empty GET request useful for testing.
dummyRequestForm :: Request Source
An empty POST request with an empty form encoded body useful for testing.