HTTP-2006.7.7: ContentsIndex
Network.Browser
Portabilitynon-portable (not tested)
Stabilityexperimental
Maintainerbjorn@bringert.net
Description
An HTTP/1.1 compatible wrapper for the HTTP module.
Synopsis
data BrowserState
data BrowserAction a
data Cookie
data Form = Form RequestMethod URI [FormVar]
data Proxy
= NoProxy
| Proxy String (Maybe Authority)
browse :: BrowserAction a -> IO a
setAllowRedirects :: Bool -> BrowserAction ()
getAllowRedirects :: BrowserAction Bool
setCookieFilter :: (URI -> Cookie -> IO Bool) -> BrowserAction ()
addCookie :: Cookie -> BrowserAction ()
setErrHandler :: (String -> IO ()) -> BrowserAction ()
setOutHandler :: (String -> IO ()) -> BrowserAction ()
setProxy :: Proxy -> BrowserAction ()
setDebugLog :: Maybe String -> BrowserAction ()
out :: String -> BrowserAction ()
err :: String -> BrowserAction ()
ioAction :: IO a -> BrowserAction a
formToRequest :: Form -> Request
uriDefaultTo :: URI -> URI -> URI
uriTrimHost :: URI -> URI
Documentation
data BrowserState
show/hide Instances
data BrowserAction a
show/hide Instances
data Cookie
show/hide Instances
Eq Cookie
Read Cookie
Show Cookie
data Form
Constructors
Form RequestMethod URI [FormVar]
data Proxy
Constructors
NoProxy
Proxy String (Maybe Authority)
browse :: BrowserAction a -> IO a
Apply a browser action to a state.
setAllowRedirects :: Bool -> BrowserAction ()
getAllowRedirects :: BrowserAction Bool
setCookieFilter :: (URI -> Cookie -> IO Bool) -> BrowserAction ()
addCookie :: Cookie -> BrowserAction ()
Adds a cookie to the browser state, removing duplicates.
setErrHandler :: (String -> IO ()) -> BrowserAction ()
setOutHandler :: (String -> IO ()) -> BrowserAction ()
setProxy :: Proxy -> BrowserAction ()
setDebugLog :: Maybe String -> BrowserAction ()
out :: String -> BrowserAction ()
err :: String -> BrowserAction ()
ioAction :: IO a -> BrowserAction a
Do an io action
formToRequest :: Form -> Request
uriDefaultTo :: URI -> URI -> URI
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
Produced by Haddock version 0.8