Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Functions contained in this module fully consume the body and thus close the connection. This is needed to avoid hitting this issue: https://github.com/brendanhay/amazonka/issues/490.
The only exception is receiveBody
, which passes a streaming response
body to a callback and thus is not allowed to close the connection. Users
of streaming functions are advised to be careful and consume the response
body manually if they want the connection to be closed promptly.
Note that using runResourceT
will always close the connection.
Documentation
receiveNull :: MonadResource m => AWSResponse a -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveEmpty :: MonadResource m => (Int -> ResponseHeaders -> () -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveXMLWrapper :: MonadResource m => Text -> (Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveXML :: MonadResource m => (Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveJSON :: MonadResource m => (Int -> ResponseHeaders -> Object -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveBytes :: MonadResource m => (Int -> ResponseHeaders -> ByteString -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #
receiveBody :: MonadResource m => (Int -> ResponseHeaders -> ResponseBody -> Either String (AWSResponse a)) -> Logger -> Service -> Proxy a -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse a))) Source #