Created
June 29, 2017 21:42
-
-
Save furu/2bd6bc0b408f4f03825a7c722cad11d3 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 qualified Data.ByteString.Lazy.Char8 as L8 | |
import Network.HTTP.Simple | |
main :: IO () | |
main = do | |
resp <- httpLBS "https://httpbin.org/get" | |
putStrLn $ "Status: " ++ show (getResponseStatus resp) | |
putStrLn $ "Headers: " ++ show (getResponseHeaders resp) | |
L8.putStrLn $ getResponseBody resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment