curl-1.3.5: Haskell binding to libcurl

Portabilityportable
Stabilityprovisional
MaintainerSigbjorn Finne <sof@galois.com>

Network.Curl.Opts

Description

This module contains the various options that specify what happens when we use perform on a Curl handle.

Documentation

data CurlOption Source

Constructors

CurlFileObj (Ptr ())

external pointer to pass to as WriteFunctions last argument.

CurlURL URLString

the URL to use for next request; can be the full URL or just the authority/hostname.

CurlPort Long

what port to use.

CurlProxy String

name of proxy

CurlUserPwd String

the user:pass string to use

CurlProxyUserPwd String

same thing, but for the proxy.

CurlRange String

byte range to fetch

CurlInFile FilePath

external pointer to pass to as WriteFunctions last argument.

CurlErrorBuffer (Ptr CChar)

buffer for curl to deposit error messages (must at least CURL_ERROR_SIZE bytes long). Uses standard error if not specified.

CurlWriteFunction WriteFunction

callback to handle incoming data.

CurlReadFunction ReadFunction

callback for supplying outgoing/uploaded data.

CurlTimeout Long

number of seconds before timing out curl operation/request.

CurlInFileSize Long

expected size of uploaded data.

CurlPostFields [String]

(Multipart) POST data.

CurlReferer String

Set the Referer: header to the given string.

CurlFtpPort String

The string to feed to the FTP PORT command.

CurlUserAgent String

Set the User-Agent: header to the given string.

CurlLowSpeed Long

If the bytes per sec drops below the given value, the operation is aborted.

CurlLowSpeedTime Long

Upper bound for request to complete.

CurlResumeFrom Long

Byte offset at which the transfer (HTTP or FTP) should start from.

CurlCookie String

Set the Cookie: header to the given cookie (name=value pairs, semicolon-separated) string.

CurlHttpHeaders [String]

Embellish the outgoing request with the given list of (formatted) header values.

CurlHttpPost [HttpPost]

(Multipart) POST data.

CurlSSLCert FilePath

file holding your private SSL certificates (default format is PEM).

CurlSSLPassword String

password to the above file.

CurlSSLKeyPassword String

an alias for the previous.

CurlCRLF Bool

If true, convert Unix newlines into CRLFs when transferring.

CurlQuote [String]

Sequence of FTP commands to execute prior to the main request.

CurlWriteHeader (Ptr ())

State / pointer argument to pass to WriteFunction callback.

CurlCookieFile FilePath

Path to file holding initial cookie data; also enables cookie handling.

CurlSSLVersion Long

What protocol to attempt using (0:default;1:TLS;2:SSLv2;3:SSLv3)

CurlTimeCondition TimeCond

How to interpret a conditional time value.

CurlTimeValue Long

Number of secs since Jan 1, 1970. Interpretation is determined by CurlTimeCondition.

CurlCustomRequest String

String holding alternative request command (WebDAV anyone?)

CurlPostQuote [String]

List of commands to issue to FTP server after the main request.

CurlWriteInfo String

Not sure what this one does; something about passing it to the output function.

CurlVerbose Bool

Control verbosity

CurlHeader Bool

Display outgoing and incoming headers

CurlNoProgress Bool

Control progress meter

CurlNoBody Bool

Use HEAD instead of GET

CurlFailOnError Bool

If status response is >= 300, return an error (and no other output).

CurlUpload Bool

Control the main dataflow, i.e., True to perform uploads.

CurlPost Bool

Issue a POST request.

CurlFtpListOnly Bool

Switch NLST for FTP directory listings

CurlFtpAppend Bool

Control if FTP uploads append rather than overwrite files

CurlUseNetRc NetRcOption

control how or if a user's.netrc will be consulted for user:password

CurlFollowLocation Bool

Handle auto-redirects by chasing down Location: values in responses.

CurlTransferTextASCII Bool

Turn on ASCII transfers for FTP transfers; default is binary (i.e. off).

CurlPut Bool

Use PUT to upload data.

CurlProgressFunction ProgressFunction

callback for showing progress

CurlProgressData (Ptr ())

state argumentto pass to progress callback.

CurlAutoReferer Bool

Control if the Referer: field is set upon following Location: redirects

CurlProxyPort Long

(Numeric) proxy port to use.

CurlPostFieldSize Long

Size of the POSTed data.

CurlHttpProxyTunnel Bool

tunnel all HTTP operations through the proxy.

CurlInterface String

Interface name of outgoing network interface ( network interface, IP address, host name.)

CurlKrb4Level String

Kerberos security level (clear, safe, confidential, private are good values, seemingly.)

CurlSSLVerifyPeer Bool

Enable the authentication of peer certificate. Default is True.

CurlCAInfo FilePath

If verifying peer's certificate, use certificates in this file to do so.

CurlMaxRedirs Long

Maximum number of Location: redirects to chase down before giving up.

CurlFiletime Bool

Try to determine the modification date of remote document; can be queried for.

CurlTelnetOptions [String]

List of commands to use for initial telnet negotiations.

CurlMaxConnects Long

Maximum number of cached active connections.

CurlClosePolicy Long

No effect (obsolete.)

CurlFreshConnect Bool

Force the opening up a new connection rather than try to reuse active connections. Default is not to.

CurlForbidReuse Bool

Do not reuse the connection of next transfer when done.

CurlRandomFile FilePath

Path to file used to seed (Open)SSL PRNG.

CurlEgdSocket FilePath

Path to domain socket of EG Daemon.

CurlConnectTimeout Long

max number of seconds to wait for the initial connection to happen.

CurlHeaderFunction WriteFunction

callback used to handle _incoming_ header data.

CurlHttpGet Bool

Revert to a GET for the next request.

CurlSSLVerifyHost Long

Perform Common name checking in peer certificate (1=> existence;2=> matches hostname.)

CurlCookieJar FilePath

Path to file where additional cookie information will be stored.

CurlSSLCipherList String

Colon-separated string list of cipher preferences to use for upcoming connection (e.g., 3DES:+RSA)

CurlHttpVersion HttpVersion

What HTTP version to use, should you want to drop back for some reason.

CurlFtpUseEPSV Bool

Attempt the use of EPSV before PASV for passive FTP downloads.

CurlSSLCertType String

The format of your certificates (PEM, DER)

CurlSSLKey FilePath

Filename of private key.

CurlSSLKeyType String

Format of private key; use ENG to load from a crypto engine.

CurlSSLEngine String

Name of crypto engine to use.

CurlSSLEngineDefault

Make crypto engine the default for crypto operations.

CurlDNSUseGlobalCache Bool

Have library uses its MT-unfriendly DNS global cache.

CurlDNSCacheTimeout Long

Number of seconds to cache results of DNS lookups in memory.

CurlPreQuote [String]

FTP commands to issue after connection and transfer mode has been set.

CurlDebugFunction DebugFunction

callback to catch and report transfer operations.

CurlDebugData (Ptr ())

state argument to pass to debug callback.

CurlCookieSession Bool

Signal the start of a cookie session, ignoring previous session cookies.

CurlCAPath FilePath

Directory holding CA certificates; used when verifying peer certificate.

CurlBufferSize Long

Turn (down, presumably) the buffers the received data is chunked up into (and reported to the WriteFunction.) A hint, library is free to ignore.

CurlNoSignal Bool

Turn off use of signals internally.

CurlShare (Ptr ())

Share handles are used for sharing data among concurrent Curl objects.

CurlProxyType Long

What type of proxy to use.

CurlEncoding String

What to report in the Accept-Encoding: header

CurlPrivate (Ptr ())

Data associated with a Curl handle.

CurlHttp200Aliases String

Alternatives to standard 200 OK response strings; whatever it takes, I suppose.

CurlUnrestrictedAuth Bool

Pass on user:pass when following redirects.

CurlFtppUseEPRT Bool

For active FTP downloads, try using EPRT command over LPRT.

CurlHttpAuth [HttpAuth]

State your authentication preferences.

CurlSSLCtxFunction SSLCtxtFunction

callback to handle setting up SSL connections; have the power to abort them.

CurlSSLCtxData (Ptr ())

state argument to pass into the above callback.

CurlFtpCreateMissingDirs Bool

Have remote directories be created if not already there

CurlProxyAuth [HttpAuth]

What preferred authentication schemes to use wrt. proxy.

CurlFtpResponseTimeout Long

max number of seconds to wait for remote server to ACK commands.

CurlIPResolve Long

Whether to resolve wrt IPv4 or IPv6.

CurlMaxFileSize Long

Limit the number of bytes you're willing to download.

CurlInFileSizeLarge LLong

Wider alternative of option giving upper bound of uploaded content (-1 => unknown.)

CurlResumeFromLarge LLong

Wider alternative for specifying initial transfer offset.

CurlMaxFileSizeLarge LLong

Wider alternative for specifying max download size.

CurlNetrcFile FilePath

Path to user's .netrc

CurlFtpSSL Long

Try enabling the use of SSL for FTP control connections and/or transfers.

CurlPostFieldSizeLarge LLong

Size of data to POST; if unspecified (or -1), curl uses strlen().

CurlTCPNoDelay Bool

Turn on or off the TCP/IP NODELAY option.

CurlFtpSSLAuth Long

Twiddle if TLS or SSL is used.

CurlIOCTLFunction (Ptr ())

somewhat obscure callback for handling read stream resets.

CurlIOCTLData (Ptr ())

state argument to the above.

CurlFtpAccount String

The string to use when server asks for account info.

CurlCookieList String

Cookie string to pass cookie engine; ALL scrubs all cookie info; SESS scrubs session ones.

CurlIgnoreContentLength Bool

If Content-Length: values are troublesome (wrong, perhaps?), use this option to ignore using them as guidance.

CurlFtpSkipPASVIP Bool

Ignore IP address in 227 responses.

CurlFtpFileMethod Long

How to navigate to a file on the remote server (single, multiple CWDs).

CurlLocalPort Port

What local port to use for established connection.

CurlLocalPortRange Port

Number of attempts at finding local ports (using LocalPort as initial base.)

CurlConnectOnly Bool

If enabled, perform all steps up until actual transfer. next three for completeness.

CurlConvFromNetworkFunction (Ptr ())

callback for doing character translations from network format.

CurlConvToNetworkFunction (Ptr ())

callback for doing character translations to network format.

CurlConvFromUtf8Function (Ptr ())

callback for translating UTF8 into host encoding.

CurlMaxSendSpeedLarge LLong

Specifies throttle value for outgoing data.

CurlMaxRecvSpeedLarge LLong

Specifies throttle for incoming data.

CurlFtpAlternativeToUser String

Alternative (to user:pass) for FTP authentication; weird.

CurlSockOptFunction (Ptr ())

callback that's injected between socket creation and connection.

CurlSockOptData (Ptr ())

state argument to the above.

CurlSSLSessionIdCache Bool

Enable the SSL session id cache; default is on, so use this to disable.

CurlSSHAuthTypes [SSHAuthType]

SSH authentication methods to use.

CurlSSHPublicKeyFile FilePath

Path to file holding user's SSH public key.

CurlSSHPrivateKeyFile FilePath

Path to file holding user's SSH private key.

CurlFtpSSLCCC Bool

Send CCC command after FTP connection has been authenticated.

CurlTimeoutMS Long

Max number of milliseconds that a transfer may take.

CurlConnectTimeoutMS Long

Max number of milliseconds that a connection attempt may take to complete.

CurlHttpTransferDecoding Bool

Disable transfer decoding; if disabled, curl will turn off chunking.

CurlHttpContentDecoding Bool

Disable content decoding, getting the raw bits. sync'ed wrt 7.19.2

CurlNewFilePerms Long 
CurlNewDirectoryPerms Long 
CurlPostRedirect Bool 
CurlSSHHostPublicKeyMD5 String 
CurlCopyPostFields Bool 
CurlProxyTransferMode Long 
CurlCRLFile FilePath 
CurlIssuerCert FilePath 
CurlAddressScope Long 
CurlCertInfo Long 
CurlUserName String 
CurlUserPassword String 
CurlProxyUser String 
CurlProxyPassword String 

Instances

data Unmarshaller a Source

Constructors

Unmarshaller 

Fields

u_long :: Int -> Long -> IO a
 
u_llong :: Int -> LLong -> IO a
 
u_string :: Int -> String -> IO a
 
u_strings :: Int -> [String] -> IO a
 
u_ptr :: Int -> Ptr () -> IO a
 
u_writeFun :: Int -> WriteFunction -> IO a
 
u_readFun :: Int -> ReadFunction -> IO a
 
u_progressFun :: Int -> ProgressFunction -> IO a
 
u_debugFun :: Int -> DebugFunction -> IO a
 
u_posts :: Int -> [HttpPost] -> IO a
 
u_sslctxt :: Int -> SSLCtxtFunction -> IO a
 
u_ioctl_fun :: Int -> Ptr () -> IO a
 
u_convFromNetwork :: Int -> Ptr () -> IO a
 
u_convToNetwork :: Int -> Ptr () -> IO a
 
u_convFromUtf8 :: Int -> Ptr () -> IO a
 
u_sockoptFun :: Int -> Ptr () -> IO a
 

u_enum :: Enum b => Unmarshaller a -> Int -> b -> IO aSource