+-- #prune
+
+-- |Definition of things related on HTTP request.
+--
+-- In general you don't have to use this module directly.
module Network.HTTP.Lucu.Request
( Method(..)
, Request(..)
- , requestP -- Parser Request
+ , requestP
)
where
import Network.HTTP.Lucu.Parser.Http
import Network.URI
+-- |This is the definition of HTTP request methods, which shouldn't
+-- require any description.
data Method = OPTIONS
| GET
| HEAD
| DELETE
| TRACE
| CONNECT
- | ExtensionMethod String
+ | ExtensionMethod !String
deriving (Eq, Show)
-
+-- |This is the definition of HTTP reqest.
data Request
= Request {
- reqMethod :: Method
- , reqURI :: URI
- , reqVersion :: HttpVersion
- , reqHeaders :: Headers
+ reqMethod :: !Method
+ , reqURI :: !URI
+ , reqVersion :: !HttpVersion
+ , reqHeaders :: !Headers
}
deriving (Show, Eq)