Safe Haskell | None |
---|---|
Language | Haskell2010 |
- amazonkaAuthHook :: AuthEnv -> Region -> Request -> IO (Either EsAmazonkaAuthError Request)
- amazonkaAuthHook' :: AuthEnv -> Region -> Request -> UTCTime -> Either EsAmazonkaAuthError Request
- toAwsRequest :: Request -> Region -> Either EsAmazonkaAuthError (Request a)
- toQS :: ByteString -> Either EsAmazonkaAuthError QueryString
- requestEndpoint :: Request -> Region -> Endpoint
- data EsAmazonkaAuthError
- toRQBody :: RequestBody -> Either EsAmazonkaAuthError RqBody
Documentation
amazonkaAuthHook :: AuthEnv -> Region -> Request -> IO (Either EsAmazonkaAuthError Request) Source #
Request hook to install into your BHEnv
. Does not handle
streaming request bodies, which should not be an issue for
Bloodhound. The exception cases handled by EsAmazonkaAuthError
are truly exceptional and should probably be thrown.
env <- newEnv region Discover let auth = env ^. envAuth let hook req = withAuth auth $ ae -> either (liftIO . throwIO) return =<< amazonkaAuthHook ae region req mgr <- newManager tlsManagerSettings let bhe = (mkBHEnv server mgr) { bhRequestHook = hook }
amazonkaAuthHook' :: AuthEnv -> Region -> Request -> UTCTime -> Either EsAmazonkaAuthError Request Source #
toAwsRequest :: Request -> Region -> Either EsAmazonkaAuthError (Request a) Source #
data EsAmazonkaAuthError Source #
These edge cases shouldn't come up in normal operation. The best course of action is probably to throw these as an exception.