Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.API.Builder.Send
Documentation
class Sendable s where Source #
Class for types that can be sent with api-builder.
Given a Builder
, a Route
, and an instance of Sendable
, we should be able to construct a Request
for the API's server. If we can't, send
returns Nothing
and APIT
complains about being unable to send the given data.
Minimal complete definition
By default, the '()' instance for Sendable
moves the query parameters of the Route
into the body of the POST request. Most APIs handle both, but some will complain if they aren't sent in the actual query. If you send
PostQuery
instead of '()', the query params won't move from the actual query string when constructing the request.
Constructors
PostQuery |