wai-middleware-rollbar-0.7.0.1: Middleware that communicates to Rollbar.

Copyright(c) Hardy Jones 2017
LicenseBSD3
Maintainerjones3.hardy@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Rollbar.API

Contents

Description

Provides functions for communicating with Rollbar through the public API.

See Rollbar's API for more details.

Synopsis

Helpful functions

These functions are probably what you want most of the time.

itemsPOST :: (MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException ItemsPOSTResponse)) Source #

Sends an Item off to Rollbar.

Creates a new Manager to send off the request.

itemsPOST' :: (MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException ItemsPOSTResponse)) Source #

Sends an Item off to Rollbar.

itemsPOSTRaw :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response (Either JSONException c)) Source #

Sends an Item off to Rollbar.

Creates a new Manager to send off the request. Makes no claims about what you get back.

itemsPOSTRaw' :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Manager -> Item a b -> f (Response (Either JSONException c)) Source #

Sends an Item off to Rollbar.

Makes no claims about what you get back.

makeRequest :: (RemoveHeaders headers, ToJSON a) => Item a headers -> Request Source #

Converts an item into a request ready to send to Rollbar.

If you need a different scheme for sending items, you'll probably want to use this along with a function like httpLbs or httpLbs.

If you want the JSON back and already have a Manager, you can use this function with setRequestManager. Then send off the request with something like httpJSONEither.

Response data types

data ItemsPOSTResponse Source #

The response received from sending an Item to Rollbar.

Constructors

ItemsPOSTSuccess 

Fields

ItemsPOSTError 

Fields

Impure functions

Use with caution.

itemsPOSTWithException :: (FromJSON c, MonadIO f, RemoveHeaders b, ToJSON a) => Item a b -> f (Response c) Source #

Sends an Item off to Rollbar.

Creates a new Manager to send off the request. Makes no claims about what you get back. Throws a JSONException if it cannot parse the response.

Yes, this name is annoying, so are exceptions.