20 lines
542 B
Haskell
20 lines
542 B
Haskell
|
{-# LANGUAGE OverloadedStrings, DataKinds#-}
|
||
|
module Requester(request) where
|
||
|
|
||
|
import Network.HTTP.Req
|
||
|
-- import qualified Data.Text as T
|
||
|
import Control.Monad.IO.Class(MonadIO)
|
||
|
import qualified Data.ByteString as B
|
||
|
import Text.URI
|
||
|
|
||
|
url :: Url 'Https
|
||
|
url = https "md.darmstadt.ccc.de" /: "mathechor-probenplanung" /: "download"
|
||
|
|
||
|
|
||
|
|
||
|
requestRunner :: (MonadIO m)=> m BsResponse
|
||
|
requestRunner = runReq defaultHttpConfig $ req GET url NoReqBody bsResponse mempty
|
||
|
|
||
|
request :: (MonadIO m) => m B.ByteString
|
||
|
request = fmap responseBody requestRunner
|