https://github.com/psibi/download
High level download interface for Haskell
https://github.com/psibi/download
Last synced: about 1 year ago
JSON representation
High level download interface for Haskell
- Host: GitHub
- URL: https://github.com/psibi/download
- Owner: psibi
- License: other
- Created: 2016-03-04T23:44:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-03-02T07:46:28.000Z (over 7 years ago)
- Last Synced: 2024-04-26T15:21:27.810Z (about 2 years ago)
- Language: C
- Homepage: https://www.stackage.org/package/download
- Size: 72.3 KB
- Stars: 10
- Watchers: 4
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# download
[](https://travis-ci.org/psibi/download)
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:
``` haskell
import Network.Download
```
Loading a webpage as a `ByteString`:
``` haskell
doc <- openURI "http://google.com"
```
Loading from a file:
``` haskell
doc <- openURI "file:///tmp/A.hs"
```
Loading a HTML page as a list of tags:
``` haskell
tags <- openAsTags "http://google.com"
```
Loading a HTML page as XML:
``` haskell
tags <- openAsXML "http://google.com"
```
Loading an RSS or Atom feed:
``` haskell
feed <- openAsFeed "http://google.com"
```
These data types can the be processed further with the XML, Feed and
TagSoup libraries.