Created
September 22, 2016 22:03
-
-
Save sdroege/8a8a1a5ab0e278cbfd66eaa625dc4536 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Default | |
import Network.HTTP.Client | |
import Network.HTTP.Client.TLS | |
import Network.HTTP.Types.Status (statusCode) | |
main :: IO () | |
main = do | |
manager <- newManager tlsManagerSettings | |
request <- parseRequest "https://paste.debian.net" | |
response <- httpLbs request manager | |
putStrLn $ "The status code was: " ++ (show $ statusCode $ responseStatus response) | |
print $ responseBody response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment