- data SCGI a
- runRequest :: Handle -> (Body -> SCGI Response) -> IO ()
- header :: ByteString -> SCGI (Maybe ByteString)
- allHeaders :: SCGI [(ByteString, ByteString)]
- method :: SCGI (Maybe ByteString)
- path :: SCGI (Maybe ByteString)
- setHeader :: ByteString -> ByteString -> SCGI ()
- type Headers = Map (CI ByteString) ByteString
- type Body = ByteString
- type Status = ByteString
- data Response = Response Status Body
the handle connected to the web server (from
|-> (Body -> SCGI Response)|
the action to run in the SCGI monad
|-> IO ()|
nothing is returned, the result of the action is written back to the server
Run a request in the SCGI monad.
Lookup a request header.
Return all request headers as a list in the format they were received from the web server.
Get the request method (GET, POST, etc.). You could look the header up yourself, but this normalizes the method name to uppercase.
Get the requested path. According to the spec, this can be complex, and actual CGI implementations diverge from the spec. I've found this to work, even though it doesn't seem correct or intuitive.
Set a response header.