curl-1.3.2.1: Haskell binding to libcurl

Portabilityportable
Stabilityprovisional
Maintaineremertens@galois.com

Network.Curl

Description

A Haskell binding the libcurl library http://curl.haxx.se/, a proven and feature-rich library for interacting with HTTP(S)/FTP servers.

The binding was initially made against version 7.16.2; libcurl does appear to be considerate in not introducing breaking changes wrt older versions. So, unless you're after the latest features (i.e., constructors towards the end the Option type), there's a very good chance your code will work against older installations of libcurl.

Documentation

module Network.Curl.Opts

module Network.Curl.Easy

module Network.Curl.Post

module Network.Curl.Info

module Network.Curl.Types

module Network.Curl.Code

withCurlDo :: IO a -> IO aSource

Should be used once to wrap all uses of libcurl. WARNING: the argument should not return before it is completely done with curl (e.g., no forking or lazy returns)

setopts :: Curl -> [CurlOption] -> IO () Source

Set a list of options on a Curl handle.

data CurlResponse Source

CurlResponse is a record type encoding all the information embodied in a response to your Curl request. Currently only used to gather up the results of doing a GET in curlGetResponse .

Constructors

curlGet :: URLString -> [CurlOption] -> IO () Source

curlGet perform a basic GET, dumping the output on stdout. The list of options are set prior performing the GET request.

curlGetString :: URLString -> [CurlOption] -> IO (CurlCode, String)Source

curlGetString performs the same request as curlGet , but returns the response body as a Haskell string.

curlGetResponse :: URLString -> [CurlOption] -> IO CurlResponse Source

curlGetResponse performs a GET, returning all the info it can lay its hands on in the response, a value of type CurlResponse .

perform_with_response :: Curl -> IO CurlResponse Source

Perform the actions already specified on the handle. Collects useful information about the returned message. Note that this function sets the CurlWriteFunction and CurlHeaderFunction options.

do_curl :: Curl -> URLString -> [CurlOption] -> IO CurlResponse Source

Performs a curl request using an exisitng curl handle. The provided URL will overwride any CurlURL options that are provided in the list of options. See also: perform_with_response .

curlHead :: URLString -> [CurlOption] -> IO (String, [(String, String)])Source

Get the headers associated with a particular URL. Returns the status line and the key-value pairs for the headers.

curlMultiPost :: URLString -> [CurlOption] -> [HttpPost] -> IO () Source

curlMultiPost perform a multi-part POST submission.

curlPost :: URLString -> [String] -> IO () Source

curlPost performs. a common POST operation, namely that of submitting a sequence of name=value pairs.

getResponseCode :: Curl -> IO Int Source

setDefaultSSLOpts :: Curl -> URLString -> IO () Source

callbackWriter :: (String -> IO ()) -> WriteFunction Source

Imports data into the Haskell world and invokes the callback.

easyWriter :: (String -> IO ()) -> WriteFunction Source

ignoreOutput :: WriteFunction Source

The output of Curl is ignored. This function does not marshall data into Haskell.

gatherOutput :: IORef [String] -> WriteFunction Source

Add chunks of data to an IORef as they arrive.

method_GET :: [CurlOption]Source

method_HEAD :: [CurlOption]Source

method_POST :: [CurlOption]Source

parseStatusNHeaders :: String -> (String, [(String, String)])Source

concRev :: [a] -> [[a]] -> [a]Source

AltStyle によって変換されたページ (->オリジナル) /