Safe Haskell | None |
---|
- data HTTPRequest = HTTPRequest {
- method :: ByteString
- uri :: ByteString
- httpver :: ByteString
- headers :: Headers
- body :: ByteString
- type Headers = Map ByteString [ByteString]
- type Handler = Socket -> HTTPRequest -> IO ()
- listenHTTP :: String -> PortNumber -> Handler -> IO ()
Documentation
data HTTPRequest Source
HTTP Request type This holds a complete HTTP request
HTTPRequest | |
|
type Headers = Map ByteString [ByteString]Source
type Handler = Socket -> HTTPRequest -> IO ()Source
:: String | Address to bind (ie. *) |
-> PortNumber | Port to listen on |
-> Handler | Route function to call |
-> IO () |
Listens for incoming HTTP request