implemented newRequest
This commit is contained in:
parent
ef3693f49c
commit
bb7b2ebaa2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user