implemented newRequest

This commit is contained in:
Jonathan Lamothe 2021-10-22 14:28:08 -04:00
parent ef3693f49c
commit bb7b2ebaa2

View File

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