Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Req = Req {}
- defReq :: Req
- appendToPath :: String -> Req -> Req
- appendToMatrixParams :: String -> Maybe String -> Req -> Req
- appendToQueryString :: Text -> Maybe Text -> Req -> Req
- addHeader :: ToText a => String -> a -> Req -> Req
- setRQBody :: ByteString -> Req -> Req
- reqToRequest :: (Functor m, MonadThrow m) => Req -> BaseUrl -> m Request
- __manager :: MVar Manager
- __withGlobalManager :: (Manager -> IO a) -> IO a
- displayHttpRequest :: Method -> String
- performRequest :: Method -> Req -> (Int -> Bool) -> BaseUrl -> EitherT String IO (Int, ByteString)
- performRequestJSON :: FromJSON result => Method -> Req -> Int -> BaseUrl -> EitherT String IO result
- catchStatusCodeException :: IO a -> IO (Either Status a)
- decodeLenient :: FromJSON a => ByteString -> Either String a
Documentation
appendToPath :: String -> Req -> Req Source
setRQBody :: ByteString -> Req -> Req Source
reqToRequest :: (Functor m, MonadThrow m) => Req -> BaseUrl -> m Request Source
performing requests
__withGlobalManager :: (Manager -> IO a) -> IO a Source
displayHttpRequest :: Method -> String Source
performRequest :: Method -> Req -> (Int -> Bool) -> BaseUrl -> EitherT String IO (Int, ByteString) Source
performRequestJSON :: FromJSON result => Method -> Req -> Int -> BaseUrl -> EitherT String IO result Source
decodeLenient :: FromJSON a => ByteString -> Either String a Source
Like decode
but allows all JSON values instead of just
objects and arrays.