Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements some network-oriented utility functions.
- checkResponse :: Monad m => Response a -> OrchestrateT m ()
- checkStatusCode :: Monad m => Int -> OrchestrateT m ()
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
.