dictfr/Download.hs
2018-04-27 00:37:57 +02:00

11 lines
251 B
Haskell

module Download (downloadHtmlDef) where
import Network.HTTP
baseUrl = "http://www.cnrtl.fr/definition/"
downloadHtmlDef :: String -> IO String
downloadHtmlDef w =
simpleHTTP (req) >>= getResponseBody
where req = getRequest (baseUrl ++ w)