Portability | posix |
---|---|
Stability | provisional |
Maintainer | Don Stewart <dons@galois.com> |
Safe Haskell | Safe-Infered |
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.
- 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"