|
Network.HTTP.Server | Portability | | Stability | provisional | Maintainer | diatchki@galois.com |
|
|
|
Description |
|
|
Synopsis |
|
server :: HStream a => Handler a -> IO () | | serverWith :: HStream a => Config -> Handler a -> IO () | | type Handler a = SockAddr -> URL -> Request a -> IO (Response a) | | data Config = Config {} | | defaultConfig :: Config | | Request (Request, rqURI, rqMethod, rqHeaders, rqBody) | | Response (Response, rspCode, rspReason, rspHeaders, rspBody) | | RequestMethod (HEAD, PUT, GET, POST, DELETE, OPTIONS, TRACE, CONNECT, Custom) | | module Network.HTTP.Headers | | module Network.HTTP.Server.Response |
|
|
Documentation |
|
|
Start a server with the default configureation, and the given handler.
Requests are handled in separete threads.
|
|
|
Start a server with the given configuration and handler.
Requests are handled in separete threads.
|
|
|
Handlers invoked to process requests.
The type parameter is for the type of the payload in the body.
It is a variation on string of some sort (e.g., String, ByteString, etc.)
|
|
|
Server configuration.
| Constructors | Config | | srvLog :: Logger | Server reports what's going on here.
| srvHost :: HostName | Host name to bind to.
| srvPort :: PortNumber | Port to listen on.
|
|
|
|
|
|
Some default options for a server:
no logging output, listen on "localhost:8000".
|
|
Request (Request, rqURI, rqMethod, rqHeaders, rqBody) |
|
Response (Response, rspCode, rspReason, rspHeaders, rspBody) |
|
RequestMethod (HEAD, PUT, GET, POST, DELETE, OPTIONS, TRACE, CONNECT, Custom) |
|
module Network.HTTP.Headers |
|
module Network.HTTP.Server.Response |
|
Produced by Haddock version 2.4.2 |