download-curl-0.1.4: High-level file download based on URLs

Portability | posix
Stability | provisional
Maintainer | Don Stewart <dons@galois.com>
Safe Haskell | None

Network.Curl.Download.Lazy

Contents

- The basic lazy interface to network content

Description

A binding to curl, an efficient, high level library for retrieving files using Uniform Resource Locators (URLs).

Content may be retrieved as a lazy ByteString.

Error handling is encapsulated in the Either type.

Synopsis

- openLazyURI :: String -> IO (Either String ByteString)
- openLazyURIWithOpts :: [CurlOption] -> String -> IO (Either String ByteString)

# The basic lazy interface to network content

openLazyURI :: String -> IO (Either String ByteString)Source

Download content specified by a url using curl, returning the content as a lazy ByteString.

If an error occurs, Left is returned, with a protocol-specific error string.

Examples:

     openLazyURI "http://haskell.org"

openLazyURIWithOpts :: [CurlOption] -> String -> IO (Either String ByteString)Source

Like openURI, but takes curl options.

Examples:

     openLazyURIWithOpts [CurlPost True] "http://haskell.org"