The HTTP package

[Tags: bsd3, library]

The HTTP package supports client-side web programming in Haskell. It lets you set up HTTP connections, transmitting requests and processing the responses coming back, all from within the comforts of Haskell. It's dependent on the network package to operate, but other than that, the implementation is all written in Haskell.

A basic API for issuing single HTTP requests + receiving responses is provided. On top of that, a session-level abstraction is also on offer (the BrowserAction monad); it taking care of handling the management of persistent connections, proxies, state (cookies) and authentication credentials required to handle multi-step interactions with a web server.

The representation of the bytes flowing across is extensible via the use of a type class, letting you pick the representation of requests and responses that best fits your use. Some pre-packaged, common instances are provided for you (ByteString, String.)

Here's an example use:

      rsp <- Network.HTTP.simpleHTTP (getRequest "")
              -- fetch document and return it (as a 'String'.)
      fmap (take 100) (getResponseBody rsp)

      rsp <- Network.Browser.browse $ do
               setAllowRedirects True -- handle HTTP redirects
               request $ getRequest ""
      fmap (take 100) (getResponseBody rsp)

Git repository available at git://


Versions3000.0.0, 3001.0.0, 3001.0.1, 3001.0.2, 3001.0.3, 3001.0.4, 3001.1.3, 3001.1.4, 3001.1.5, 4000.0.0, 4000.0.1, 4000.0.2, 4000.0.3, 4000.0.4, 4000.0.5, 4000.0.6, 4000.0.7, 4000.0.8, 4000.0.9, 4000.0.10, 4000.1.0, 4000.1.1, 4000.1.2, 4000.2.0, 4000.2.1, 4000.2.2, 4000.2.3, 4000.2.4, 4000.2.5, 4000.2.6, 4000.2.7, 4000.2.8, 4000.2.9, 4000.2.10, 4000.2.11, 4000.2.12, 4000.2.13, 4000.2.14, 4000.2.15, 4000.2.16, 4000.2.16.1, 4000.2.17, 4000.2.18, 4000.2.19
Dependenciesarray, base, bytestring, mtl, network, old-time, parsec, Win32
CopyrightCopyright (c) 2002, Warrick Gray Copyright (c) 2002-2005, Ian Lynagh Copyright (c) 2003-2006, Bjorn Bringert Copyright (c) 2004, Andre Furtado Copyright (c) 2004, Ganesh Sittampalam Copyright (c) 2004-2005, Dominic Steinitz Copyright 2007 Robin Bate Boerop Copyright 2008- Sigbjorn Finne
AuthorWarrick Gray <>
MaintainerSigbjorn Finne <>
Home page
UploadedSun Dec 20 21:53:39 UTC 2009 by SigbjornFinne
DistributionsDebian:4000.2.3, Fedora:4000.2.10, FreeBSD:4000.2.10, LTSHaskell:4000.2.19, NixOS:4000.2.19, Stackage:4000.2.19
Downloads119911 total (1653 in last 30 days)
StatusDocs uploaded by user
Build status unknown [no reports yet]




old-baseOld, monolithic baseDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees