pusher-http-haskell-2.1.0.12: Haskell client library for the Pusher Channels HTTP API
Copyright(c) Will Sewell 2016
LicenseMIT
Maintainerme@willsewell.com
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Pusher.Internal.HTTP

Description

A layer on top of the HTTP functions in the http-client library which lifts the return values to the typeclasses we are using in this library. Non 200 responses are converted into MonadError errors.

Synopsis

Documentation

data RequestParams Source #

Constructors

RequestParams 

Fields

Instances

Instances details
Show RequestParams Source # 
Instance details

Defined in Network.Pusher.Internal.HTTP

get :: FromJSON a => Manager -> RequestParams -> IO (Either PusherError a) Source #

Issue an HTTP GET request. On a 200 response, the response body is returned. On failure, an error will be thrown into the MonadError instance.

post :: ToJSON a => Manager -> RequestParams -> a -> IO (Either PusherError ()) Source #

Issue an HTTP POST request.