HTTP-400000

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 Cookie 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.

request :: HStream ty => HTTPRequest ty -> BrowserAction (HandleStream ty) (URI, HTTPResponse ty)Source

setAllowRedirects :: Bool -> BrowserAction t () Source

getAllowRedirects :: BrowserAction t Bool Source

data Authority Source

Constructors

getAuthorities :: BrowserAction t [Authority]Source

Interacting with browser state:

setAuthorities :: [Authority] -> BrowserAction t () Source

addAuthority :: Authority -> BrowserAction t () Source

getAuthorityGen :: BrowserAction t (URI -> String -> IO (Maybe (String, String)))Source

setAuthorityGen :: (URI -> String -> IO (Maybe (String, String))) -> BrowserAction t () Source

setAllowBasicAuth :: Bool -> BrowserAction t () Source

setCookieFilter :: (URI -> Cookie -> IO Bool) -> BrowserAction t () Source

defaultCookieFilter :: URI -> Cookie -> IO Bool Source

userCookieFilter :: URI -> Cookie -> IO Bool Source

getCookies :: BrowserAction t [Cookie]Source

setCookies :: [Cookie] -> BrowserAction t () Source

addCookie :: Cookie -> BrowserAction t () Source

Adds a cookie to the browser state, removing duplicates.

setErrHandler :: (String -> IO ()) -> BrowserAction t () Source

setOutHandler :: (String -> IO ()) -> BrowserAction t () Source

setProxy :: Proxy -> BrowserAction t () Source

setDebugLog :: Maybe String -> BrowserAction t () Source

out :: String -> BrowserAction t () Source

err :: String -> BrowserAction t () Source

ioAction :: IO a -> BrowserAction t aSource

Do an io action

defaultGETRequest :: URI -> Request Source

formToRequest :: Form -> Request Source

uriDefaultTo :: URI -> URI -> URI Source

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.

uriTrimHost :: URI -> URI Source

AltStyle によって変換されたページ (->オリジナル) /