diff --git a/src/Network/GemServ/Types.hs b/src/Network/GemServ/Types.hs index 1fb1246..21c0c63 100644 --- a/src/Network/GemServ/Types.hs +++ b/src/Network/GemServ/Types.hs @@ -25,7 +25,8 @@ License along with this program. If not, see -} module Network.GemServ.Types ( - Request (..) + Request (..), + newRequest ) where import Data.Word (Word32) @@ -42,4 +43,16 @@ data Request = Request -- ^ The decoded request query } deriving (Eq, Show) +-- | Builds a new request +newRequest + :: String + -- ^ The hostname + -> Request +newRequest host = Request + { reqHost = host + , reqPort = Nothing + , reqPath = [] + , reqQuery = "" + } + --jl