Safe Haskell | None |
---|
- data Manager
- mResponseTimeout :: Manager -> Maybe Int
- mRetryableException :: Manager -> SomeException -> Bool
- mWrapIOException :: Manager -> forall a. IO a -> IO a
- data ManagerSettings = ManagerSettings {
- managerConnCount :: !Int
- managerRawConnection :: !(IO (Maybe HostAddress -> String -> Int -> IO Connection))
- managerTlsConnection :: !(IO (Maybe HostAddress -> String -> Int -> IO Connection))
- managerResponseTimeout :: !(Maybe Int)
- managerRetryableException :: !(SomeException -> Bool)
- managerWrapIOException :: !(forall a. IO a -> IO a)
- data ConnKey = ConnKey !ConnHost !Int !Bool
- data ConnHost
- = HostName !Text
- | HostAddress !HostAddress
- newManager :: ManagerSettings -> IO Manager
- closeManager :: Manager -> IO ()
- getConn :: Request -> Manager -> IO (ConnRelease, Connection, ManagedConn)
- data ConnReuse
- type ConnRelease = ConnReuse -> IO ()
- data ManagedConn
- failedConnectionException :: Request -> HttpException
- defaultManagerSettings :: ManagerSettings
Documentation
Keeps track of open connections for keep-alive.
If possible, you should share a single Manager
between multiple threads and requests.
mResponseTimeout :: Manager -> Maybe IntSource
Copied from managerResponseTimeout
mWrapIOException :: Manager -> forall a. IO a -> IO aSource
data ManagerSettings Source
Settings for a Manager
. Please use the defaultManagerSettings
function and then modify
individual settings.
ManagerSettings | |
|
ConnKey
consists of a hostname, a port and a Bool
specifying whether to use SSL.
Hostname or resolved host address.
HostName !Text | |
HostAddress !HostAddress |
newManager :: ManagerSettings -> IO ManagerSource
Create a Manager
. You must manually call closeManager
to shut it down.
Creating a new Manager
is an expensive operation, you are advised to share
a single Manager
between requests instead.
closeManager :: Manager -> IO ()Source
getConn :: Request -> Manager -> IO (ConnRelease, Connection, ManagedConn)Source
type ConnRelease = ConnReuse -> IO ()Source
data ManagedConn Source
failedConnectionException :: Request -> HttpExceptionSource
Create an exception to be thrown if the connection for the given request fails.