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

Copyright(c) Don Stewart
LicenseBSD3
MaintainerDon Stewart <dons@galois.com>
Stabilityprovisional
Portabilityposix
Safe HaskellNone
LanguageHaskell98

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"