Files
haskell/exercises/Examples/FetchWords.hs
T
2021-02-05 09:42:17 +02:00

10 lines
237 B
Haskell

import Network.HTTP
import Control.Monad
main = do
rsp <- simpleHTTP (getRequest "http://httpbin.org/base64/aGFza2VsbCBmb3IgZXZlcgo=")
body <- getResponseBody rsp
forM_ (words body) $ \w -> do
putStr "word: "
putStrLn w