Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
A #SoupClientContext provides additional information about the client making a particular request. In particular, you can use soup_client_context_get_auth_domain() and soup_client_context_get_auth_user() to determine if HTTP authentication was used successfully.
soup_client_context_get_remote_address() and/or soup_client_context_get_host() can be used to get information for logging or debugging purposes. soup_client_context_get_gsocket() may also be of use in some situations (eg, tracking when multiple requests are made on the same connection).
- newtype ClientContext = ClientContext (ForeignPtr ClientContext)
- noClientContext :: Maybe ClientContext
- data ClientContextGetAddressMethodInfo
- clientContextGetAddress :: MonadIO m => ClientContext -> m (Maybe Address)
- data ClientContextGetAuthDomainMethodInfo
- clientContextGetAuthDomain :: MonadIO m => ClientContext -> m (Maybe AuthDomain)
- data ClientContextGetAuthUserMethodInfo
- clientContextGetAuthUser :: MonadIO m => ClientContext -> m (Maybe Text)
- data ClientContextGetGsocketMethodInfo
- clientContextGetGsocket :: MonadIO m => ClientContext -> m (Maybe Socket)
- data ClientContextGetHostMethodInfo
- clientContextGetHost :: MonadIO m => ClientContext -> m (Maybe Text)
- data ClientContextGetLocalAddressMethodInfo
- clientContextGetLocalAddress :: MonadIO m => ClientContext -> m (Maybe SocketAddress)
- data ClientContextGetRemoteAddressMethodInfo
- clientContextGetRemoteAddress :: MonadIO m => ClientContext -> m (Maybe SocketAddress)
- data ClientContextGetSocketMethodInfo
- clientContextGetSocket :: MonadIO m => ClientContext -> m Socket
- data ClientContextStealConnectionMethodInfo
- clientContextStealConnection :: MonadIO m => ClientContext -> m IOStream
Exported types
newtype ClientContext Source
Methods
clientContextGetAddress
data ClientContextGetAddressMethodInfo Source
((~) * signature (m (Maybe Address)), MonadIO m) => MethodInfo * ClientContextGetAddressMethodInfo ClientContext signature |
clientContextGetAddress :: MonadIO m => ClientContext -> m (Maybe Address) Source
Deprecated: Use soup_client_context_get_remote_address(), which returnsa #GSocketAddress.
clientContextGetAuthDomain
data ClientContextGetAuthDomainMethodInfo Source
((~) * signature (m (Maybe AuthDomain)), MonadIO m) => MethodInfo * ClientContextGetAuthDomainMethodInfo ClientContext signature |
clientContextGetAuthDomain :: MonadIO m => ClientContext -> m (Maybe AuthDomain) Source
clientContextGetAuthUser
data ClientContextGetAuthUserMethodInfo Source
((~) * signature (m (Maybe Text)), MonadIO m) => MethodInfo * ClientContextGetAuthUserMethodInfo ClientContext signature |
clientContextGetAuthUser :: MonadIO m => ClientContext -> m (Maybe Text) Source
clientContextGetGsocket
data ClientContextGetGsocketMethodInfo Source
((~) * signature (m (Maybe Socket)), MonadIO m) => MethodInfo * ClientContextGetGsocketMethodInfo ClientContext signature |
clientContextGetGsocket :: MonadIO m => ClientContext -> m (Maybe Socket) Source
clientContextGetHost
data ClientContextGetHostMethodInfo Source
((~) * signature (m (Maybe Text)), MonadIO m) => MethodInfo * ClientContextGetHostMethodInfo ClientContext signature |
clientContextGetHost :: MonadIO m => ClientContext -> m (Maybe Text) Source
clientContextGetLocalAddress
data ClientContextGetLocalAddressMethodInfo Source
((~) * signature (m (Maybe SocketAddress)), MonadIO m) => MethodInfo * ClientContextGetLocalAddressMethodInfo ClientContext signature |
clientContextGetLocalAddress :: MonadIO m => ClientContext -> m (Maybe SocketAddress) Source
clientContextGetRemoteAddress
data ClientContextGetRemoteAddressMethodInfo Source
((~) * signature (m (Maybe SocketAddress)), MonadIO m) => MethodInfo * ClientContextGetRemoteAddressMethodInfo ClientContext signature |
clientContextGetRemoteAddress :: MonadIO m => ClientContext -> m (Maybe SocketAddress) Source
clientContextGetSocket
data ClientContextGetSocketMethodInfo Source
((~) * signature (m Socket), MonadIO m) => MethodInfo * ClientContextGetSocketMethodInfo ClientContext signature |
clientContextGetSocket :: MonadIO m => ClientContext -> m Socket Source
Deprecated: use soup_client_context_get_gsocket(), which returnsa #GSocket.
clientContextStealConnection
data ClientContextStealConnectionMethodInfo Source
((~) * signature (m IOStream), MonadIO m) => MethodInfo * ClientContextStealConnectionMethodInfo ClientContext signature |
clientContextStealConnection :: MonadIO m => ClientContext -> m IOStream Source