| Safe Haskell | None |
|---|
Ketchup.Httpd
- data HTTPRequest = HTTPRequest {
- method :: ByteString
- uri :: ByteString
- httpver :: ByteString
- headers :: Headers
- body :: ByteString
- type Headers = [(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
Constructors
| HTTPRequest | |
Fields
| |
Instances
type Headers = [(ByteString, [ByteString])]Source
type Handler = Socket -> HTTPRequest -> IO ()Source
Arguments
| :: String | Address to bind (ie. *) |
| -> PortNumber | Port to listen on |
| -> Handler | Route function to call |
| -> IO () |
Listens for incoming HTTP request