pusher-http-haskell-1.5.1.3: Haskell client library for the Pusher HTTP API

Copyright(c) Will Sewell 2016
LicenseMIT
Maintainerme@willsewell.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Pusher.Internal.HTTP

Description

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

Synopsis

Documentation

data RequestParams Source #

Constructors

RequestParams 

Fields

get Source #

Arguments

:: FromJSON a 
=> Manager 
-> RequestParams 
-> ExceptT PusherError IO a

The body of the response.

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 -> ExceptT PusherError IO () Source #

Issue an HTTP POST request.