From bb7b2ebaa2da4dedce6f1bf98ffd4d90b75028e3 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 22 Oct 2021 14:28:08 -0400 Subject: [PATCH] implemented newRequest --- src/Network/GemServ/Types.hs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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