1. Cédric Bonhomme
  2. simpleHaskellHTTPClient

Commits

Cédric Bonhomme  committed 81e8114 Draft

URL defined in main section

  • Participants
  • Parent commits e84bca3
  • Branches default

Comments (0)

Files changed (1)

File troveBoxClient.hs

View file
-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
+    response <- simpleHTTP (getRequest url)
+    body <- getResponseBody response
+    return body
 
 main = do
-  fetch url
+    let url = "http://photos.cedricbonhomme.org/photos/list.json?pageSize=1000"
+    fetch url