rest-client-0.4: Utility library for use in generated API client libraries.

Safe HaskellNone
LanguageHaskell98

Rest.Client.Internal

Synopsis

Documentation

class Monad m => MonadIO m where

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a

Lift a computation from the IO monad.

Instances

MonadIO IO 
MonadIO m => MonadIO (MaybeT m) 
MonadIO m => MonadIO (ListT m) 
MonadIO m => MonadIO (IdentityT m) 
MonadIO m => MonadIO (ExceptionT m) 
MonadIO m => MonadIO (ResourceT m) 
MonadIO m => MonadIO (ApiT m) 
(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
MonadIO m => MonadIO (StateT s m) 
MonadIO m => MonadIO (StateT s m) 
MonadIO m => MonadIO (ReaderT r m) 
(Error e, MonadIO m) => MonadIO (ErrorT e m) 
MonadIO m => MonadIO (ContT r m) 
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 

data ByteString :: *

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A lazy ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Lazy.Char8 it can be interpreted as containing 8-bit characters.

intercalate :: [a] -> [[a]] -> [a]

intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.

class ShowUrl a where

Methods

showUrl :: a -> String

Instances

hAccept :: HeaderName

hContentType :: HeaderName

data ApiRequest Source

Constructors

ApiRequest 

Fields

method :: String
 
uri :: String
 
params :: [(String, String)]
 
requestHeaders :: RequestHeaders
 
requestBody :: ByteString
 

doRequest :: ApiStateC m => (ByteString -> Reason e) -> (ByteString -> a) -> ApiRequest -> m (ApiResponse e a) Source

parseResult :: (ByteString -> Reason e) -> (ByteString -> a) -> Response ByteString -> ApiResponse e a Source

fromJSON :: FromJSON a => ByteString -> a Source

toJSON :: ToJSON a => a -> ByteString Source

fromXML :: XmlStringToType a => ByteString -> a Source

toXML :: XmlStringToType a => a -> ByteString Source

makeReq :: String -> String -> [[String]] -> [(String, String)] -> RequestHeaders -> ByteString -> ApiRequest Source

doReq :: (ApiStateC m, MonadIO m) => ApiRequest -> m (Response ByteString) Source