hackage-security-HTTP-0.1.1.2: Hackage security bindings against the HTTP library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hackage.Security.Client.Repository.HttpLib.HTTP

Description

Implementation of HttpClient using the HTTP package

Synopsis

Documentation

withClient :: (Browser -> HttpLib -> IO a) -> IO a Source #

Initialize the client

TODO: This currently uses the lazy bytestring API offered by the HTTP library. Unfortunately this provides no way of closing the connection when the callback decides it doesn't require any further input. It seems impossible however to implement a proper streaming API. See https://github.com/haskell/HTTP/issues/86.

Additional operations

setOutHandler :: Browser -> (String -> IO ()) -> IO () Source #

setErrHandler :: Browser -> (String -> IO ()) -> IO () Source #

Low-level API

withBrowser :: forall a. Browser -> BrowserAction LazyStream a -> IO a Source #

Run a browser action

IMPLEMENTATION NOTE: the browse action doesn't itself create any connections, they are created on demand; we just need to make sure to carry this state from one invocation of browse to another.

Exception types