Skip to content

Instantly share code, notes, and snippets.

@bradclawsie
Created November 25, 2012 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradclawsie/4142837 to your computer and use it in GitHub Desktop.
Save bradclawsie/4142837 to your computer and use it in GitHub Desktop.
http-consuits.hs
module Main where
import qualified Data.Conduit as C
import qualified Network.HTTP.Conduit as HC
main :: IO ()
main = do
manager <- HC.newManager HC.def
request' <- HC.parseUrl "https://www.google.com/"
let request = request' { HC.checkStatus = \_ _ -> Nothing }
response <- C.runResourceT $ HC.httpLbs request manager
print $ show response
HC.closeManager manager
return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment