Copyright | (c) Will Sewell 2016 |
---|---|
License | MIT |
Maintainer | [email protected] |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data RequestParams = RequestParams {}
- get :: FromJSON a => Manager -> RequestParams -> IO (Either PusherError a)
- post :: ToJSON a => Manager -> RequestParams -> a -> IO (Either PusherError ())
Documentation
data RequestParams Source #
Constructors
RequestParams | |
Fields
|
Instances
Show RequestParams Source # | |
Defined in Network.Pusher.Internal.HTTP Methods showsPrec :: Int -> RequestParams -> ShowS # show :: RequestParams -> String # showList :: [RequestParams] -> ShowS # |
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.