-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | http-client backend using the connection package and tls library
--   
--   Hackage documentation generation is not reliable. For up to date
--   documentation, please see:
--   <a>https://www.stackage.org/package/http-client-tls</a>.
@package http-client-tls
@version 0.3.4.2


-- | Support for making connections via the connection package and, in
--   turn, the tls package suite.
--   
--   Recommended reading:
--   <a>https://haskell-lang.org/library/http-client</a>
module Network.HTTP.Client.TLS

-- | Default TLS-enabled manager settings
tlsManagerSettings :: ManagerSettings

-- | Create a TLS-enabled <a>ManagerSettings</a> with the given
--   <a>TLSSettings</a> and <a>SockSettings</a>
mkManagerSettings :: TLSSettings -> Maybe SockSettings -> ManagerSettings

-- | Same as <a>mkManagerSettings</a>, but also takes an optional
--   <a>ConnectionContext</a>. Providing this externally can be an
--   optimization, though that may change in the future. For more
--   information, see:
--   
--   <a>https://github.com/snoyberg/http-client/pull/227</a>
mkManagerSettingsContext :: Maybe ConnectionContext -> TLSSettings -> Maybe SockSettings -> ManagerSettings

-- | Load up a new TLS manager with default settings, respecting proxy
--   environment variables.
newTlsManager :: MonadIO m => m Manager

-- | Apply digest authentication to this request.
--   
--   Note that this function will need to make an HTTP request to the
--   server in order to get the nonce, thus the need for a <tt>Manager</tt>
--   and to live in <tt>IO</tt>. This also means that the request body will
--   be sent to the server. If the request body in the supplied
--   <tt>Request</tt> can only be read once, you should replace it with a
--   dummy value.
--   
--   In the event of successfully generating a digest, this will return a
--   <tt>Just</tt> value. If there is any problem with generating the
--   digest, it will return <tt>Nothing</tt>.
applyDigestAuth :: (MonadIO m, MonadThrow n) => ByteString -> ByteString -> Request -> Manager -> m (n Request)

-- | Generated by <a>applyDigestAuth</a> when it is unable to apply the
--   digest credentials to the request.
data DigestAuthException
DigestAuthException :: Request -> (Response ()) -> DigestAuthExceptionDetails -> DigestAuthException

-- | Detailed explanation for failure for <a>DigestAuthException</a>
data DigestAuthExceptionDetails
UnexpectedStatusCode :: DigestAuthExceptionDetails
MissingWWWAuthenticateHeader :: DigestAuthExceptionDetails
WWWAuthenticateIsNotDigest :: DigestAuthExceptionDetails
MissingRealm :: DigestAuthExceptionDetails
MissingNonce :: DigestAuthExceptionDetails

-- | User friendly display of a <a>DigestAuthException</a>
displayDigestAuthException :: DigestAuthException -> String

-- | Get the current global <a>Manager</a>
getGlobalManager :: IO Manager

-- | Set the current global <a>Manager</a>
setGlobalManager :: Manager -> IO ()
instance GHC.Show.Show Network.HTTP.Client.TLS.DigestAuthException
instance GHC.Classes.Ord Network.HTTP.Client.TLS.DigestAuthExceptionDetails
instance GHC.Classes.Eq Network.HTTP.Client.TLS.DigestAuthExceptionDetails
instance GHC.Read.Read Network.HTTP.Client.TLS.DigestAuthExceptionDetails
instance GHC.Show.Show Network.HTTP.Client.TLS.DigestAuthExceptionDetails
instance GHC.Exception.Exception Network.HTTP.Client.TLS.DigestAuthException
