Skip to content

Instantly share code, notes, and snippets.

@apeyroux
Created January 17, 2014 15:19
Show Gist options
  • Save apeyroux/8475122 to your computer and use it in GitHub Desktop.
Save apeyroux/8475122 to your computer and use it in GitHub Desktop.
import Network.Curl
import System.IO
import Data.List
main = do
h <- openBinaryFile "lrues.txt" ReadMode
c <- hGetContents h
mapM (\x -> do
resp <- (curlGetResponse_ ("http://10.192.45.36/JDONREFv3JSON/Normalise?application=2&services=1&operation=1&donnees=&donnees=appartement%200%20entr%C3%A9e%20B&donnees=&donnees=24-26%20ter%20rue%20d" ++ x) [] :: IO CurlResponse)
r <- (respGetInfo resp TotalTime)
u <- (respGetInfo resp EffectiveUrl)
print r) (lines c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment