orchestrate-0.2.0.3: An API client for http://orchestrate.io/.

Safe HaskellNone
LanguageHaskell2010

Database.Orchestrate.Network

Description

This module implements some network-oriented utility functions.

Synopsis

Documentation

checkResponse :: Monad m => Response a -> OrchestrateT m () Source

This takes a response and checks that the status code passes.

If the HTTP status code is not OK, this returns an error in the OrchestrateT monad.

checkStatusCode :: Monad m => Int -> OrchestrateT m () Source

This checks the status code. Currently 200 and 204 are OK. Everything else is bad. Bad codes throw an exception in OrchestrateT.