api-builder-0.10.0.0: Library for easily building REST API wrappers in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.API.Builder.Send

Synopsis

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.

Methods

send :: Builder -> Route -> s -> Maybe Request Source

data PostQuery Source

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