HTTP-3001年1月3日: 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 Source

Instances

data BrowserAction a Source

Instances

data Cookie Source

Constructors

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 a -> IO aSource

Apply a browser action to a state.

request :: Request -> BrowserAction (URI, Response)Source

setAllowRedirects :: Bool -> BrowserAction () Source

getAllowRedirects :: BrowserAction Bool Source

data Authority Source

Constructors

getAuthorities :: BrowserAction [Authority]Source

Interacting with browser state:

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

addAuthority :: Authority -> BrowserAction () Source

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

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

setAllowBasicAuth :: Bool -> BrowserAction () Source

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

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

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

getCookies :: BrowserAction [Cookie]Source

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

addCookie :: Cookie -> BrowserAction () Source

Adds a cookie to the browser state, removing duplicates.

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

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

setProxy :: Proxy -> BrowserAction () Source

setDebugLog :: Maybe String -> BrowserAction () Source

out :: String -> BrowserAction () Source

err :: String -> BrowserAction () Source

ioAction :: IO a -> BrowserAction 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 によって変換されたページ (->オリジナル) /