aboutsummaryrefslogtreecommitdiff
path: root/src/HTTP.hs
blob: 5fb337462c3ee3cc9072646b7b958f00027bd5de (plain)
1
2
3
4
5
6
7
8
9
10
11
module HTTP (get) where

import qualified Data.ByteString.Lazy as BS
import           Data.Text            (Text)
import qualified Data.Text            as T
import           Data.Text.Encoding   as T
import qualified Data.Text.IO         as T
import qualified Network.HTTP.Conduit as HTTP

get :: Text -> IO Text
get url = (T.decodeUtf8 . BS.toStrict) <$> HTTP.simpleHttp (T.unpack url)