Skip to content

Instantly share code, notes, and snippets.

@aconbere
Forked from joewilliams/print_http_json.ml
Created September 20, 2009 04:40
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 aconbere/189721 to your computer and use it in GitHub Desktop.
Save aconbere/189721 to your computer and use it in GitHub Desktop.
module Main where
import Network.HTTP
import Text.JSON
import System.Environment
get :: String -> IO String
get url = do simpleHTTP (getRequest url) >>= getResponseBody
main :: IO ()
main = do
body <- getArgs >>= get.(!! 0)
print $ showJSON body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment