HTTP-4000.0.2: A library for client-side HTTP

Portabilitynon-portable (not tested)
Stabilityexperimental
Maintainerbjorn@bringert.net

Network.Browser

Description

An HTTP/1.1 compatible wrapper for the HTTP module.

Synopsis

Documentation

data BrowserState connection Source

Instances

data BrowserAction conn a Source

Instances

data Form Source

Constructors

Form RequestMethod URI [FormVar] 

data Proxy Source

Specifies if a proxy should be used for the request.

Constructors

NoProxy

Don't use a proxy.

Proxy String (Maybe Authority)

Use the proxy given. Should be of the form http://host:port, host, host:port, or http://host

browse :: BrowserAction conn a -> IO aSource

Apply a browser action to a state.

getAuthorities :: BrowserAction t [Authority]Source

Interacting with browser state:

addCookie :: Cookie -> BrowserAction t ()Source

Adds a cookie to the browser state, removing duplicates.

ioAction :: IO a -> BrowserAction t aSource

Do an io action

uriDefaultTo :: URI -> URI -> URISource

Returns a URI that is consistent with the first argument uri when read in the context of a second. If second argument is not sufficient context for determining a full URI then anarchy reins.