ContentsIndex
Framework.Http.Httpd
PortabilityGHC
Stabilityunstable
MaintainerIlya Portnov
Description

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) was written by Henning Thielemann.

Synopsis
type Server = ()
initServer :: StaticConfig -> (HttpRequest -> IO HttpResponse) -> IO Server
initServerLazy :: Int -> StaticConfig -> (Request S -> IO (Response S)) -> IO Server
queryToArguments :: String -> [(String, String)]
addCache :: Int -> (String, String)
noCache :: (String, String)
contentType :: String -> (String, String)
int2respCode :: Int -> ResponseCode
Documentation
type Server = ()
initServer
:: StaticConfig
-> HttpRequest -> IO HttpResponseThe functionality of the Sever
-> IO ServerA token for the Server
This server transfers documents as one parcel, using the content-length header.
initServerLazy
:: IntChunk size
-> StaticConfig
-> Request S -> IO (Response S)The functionality of the Sever
-> IO ServerA token for the 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.
queryToArguments :: String -> [(String, String)]
Takes an escaped query, optionally starting with ?, and returns an unescaped index-value list.
addCache :: Int -> (String, String)
noCache :: (String, String)
contentType :: String -> (String, String)
int2respCode :: Int -> ResponseCode
Produced by Haddock version 2.4.2