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

Portabilityposix
Stabilityprovisional
MaintainerDon Stewart <dons@galois.com>

Network.Curl.Download.Lazy

Contents

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

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"