-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A simple web-server with an interact style API
--   
--   This web server promotes a Request to IO Response function into a
--   local web server. The user can decide how to interpret the requests,
--   and the library is intended for implementing Ajax APIs.
@package httpd-shed
@version 0.4.0.3


-- | A trivial web server.
--   
--   This web server promotes a Request to IO Response function into a
--   local web server. The user can decide how to interpret the requests,
--   and the library is intended for implementing Ajax APIs.
--   
--   initServerLazy (and assocated refactorings), and Chunking support was
--   written by Henning Thielemann. Handling of POST-based payloads was
--   been written by Brandon Moore. initServerBind support was written by
--   John Van Enk.
module Network.Shed.Httpd
type Server = ()

-- | This server transfers documents as one parcel, using the
--   content-length header.
initServer :: Int -> (Request -> IO Response) -> IO Server

-- | This server transfers documents in chunked mode and without
--   content-length header. This way you can ship infinitely big documents.
--   It inserts the transfer encoding header for you.
initServerLazy :: Int -> Int -> (Request -> IO Response) -> IO Server

-- | This server transfers documents as one parcel, using the
--   content-length header, and takes an additional
initServerBind :: Int -> HostAddress -> (Request -> IO Response) -> IO Server
data Request
Request :: String -> URI -> [(String, String)] -> String -> Request
[reqMethod] :: Request -> String
[reqURI] :: Request -> URI
[reqHeaders] :: Request -> [(String, String)]
[reqBody] :: Request -> String
data Response
Response :: Int -> [(String, String)] -> String -> Response
[resCode] :: Response -> Int
[resHeaders] :: Response -> [(String, String)]
[resBody] :: Response -> String

-- | Takes an escaped query, optionally starting with <tt>?</tt>, and
--   returns an unescaped index-value list.
queryToArguments :: String -> [(String, String)]
addCache :: Int -> (String, String)
noCache :: (String, String)
contentType :: String -> (String, String)
instance GHC.Show.Show Network.Shed.Httpd.Response
instance GHC.Show.Show Network.Shed.Httpd.Request
