Source

simpleHaskellHTTPClient / troveBoxClient.hs

module HTTPExample
where

import Network.HTTP -- SimpleHTTP


url <- "http://photos.cedricbonhomme.org/photos/list.json?pageSize=1000"

-- Fetch a URL via GET
fetch :: String -> IO String
fetch url = do
  response <- simpleHTTP (getRequest url)
  body <- getResponseBody response
  return body

main = do
  fetch url