Commits

Cédric Bonhomme committed 81e8114 Draft

URL defined in main section

Comments (0)

Files changed (1)

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
+    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