0

I want to download a file/zip archiv. (for example the new ubuntu iso, oe...)

I came across following answer from daydaynatation in this: question

downloadFile :: String -> IO ()
downloadFile url = do
  request <- parseRequest url
  runResourceT $ httpSink request $ \_ -> sinkFile "tmpfile"

but sadly this downloads only the the site quellcode and not the file which will be downloaded when you navigate to the respective url in the browser of your choice... So is this possible with this approach or what do I have to try otherwise

Thomas Meyer
  • 384
  • 1
  • 11
  • Did you put the file's URL? Or the HTML page's URL? – user253751 Jun 02 '22 at 17:22
  • 1
    FYI quellcode = "source code" in English – user253751 Jun 02 '22 at 17:22
  • You may need to enable following HTTP redirects, how to do that will depend on the library – Colin Barrett Jun 02 '22 at 17:23
  • Do you know how to do this with some other tool than Haskell (and other than the browser, obviously), say wget or curl? If so, what does that look like? If you don't know precisely what you want the Haskell to *do*, you (and we) definitely can't write the code to do that. – Daniel Wagner Jun 02 '22 at 17:30

0 Answers0