download

High-level file download based on URLs https://github.com/psibi/download

Latest on Hackage:0.3.2.7

See all snapshots download appears in

BSD-3-Clause licensed by Don Stewart
Maintained by Sibi Prabakaran

Module documentation for 0.3.2.5

This version can be pinned in stack with:[email protected]:06995f9ca668b4c4390d021ce2c08f84708e9050dc860407baf6ade5f5232ed8,2604

download

Build Status

Download web content as strict bytestring, strings, HTML tags, XML, RSS or Atom feeds or JSON, via HTTP, FTP or file protocols, using a URL interface.

Using the library:

Importing the library:

import Network.Download

Loading a webpage as a ByteString:

doc  <- openURI "http://google.com"

Loading from a file:

doc  <- openURI "file:///tmp/A.hs"

Loading a HTML page as a list of tags:

tags <- openAsTags "http://google.com"

Loading a HTML page as XML:

tags <- openAsXML "http://google.com"

Loading an RSS or Atom feed:

feed <- openAsFeed "http://google.com"

These data types can the be processed further with the XML, Feed and TagSoup libraries.

Changes

0.3.2.5

  • OSX Support added. Thanks to Brian Crowder.
  • Package backported to old versions of ghc. Thanks to @thielema.
  • Add Travis support for GHC 8

0.3.2.4

  • Fix C code warnings
  • Cleanup in Download.hsc file

0.3.2.3

  • Fix hackage page rendering

0.3.2.2

  • Basic test suite added.