/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
namespace CurlSharp
{
///
/// One of these is passed as the first parameter to
/// . The Description column of
/// the table describes the value that should be passed as the second parameter.
///
public enum CurlOption
{
///
/// Pass a true parameter to enable this. When enabled, libcurl
/// will automatically set the Referer: field in requests where it follows
/// a Location: redirect.
///
AutoReferer = 58,
///
/// Pass an int specifying your preferred size for the receive buffer
/// in libcurl. The main point of this would be that the write callback gets
/// called more often and with smaller chunks. This is just treated as a
/// request, not an order. You cannot be guaranteed to actually get the
/// requested size. (Added in 7.10)
///
BufferSize = 98,
///
/// Pass a string naming a file holding one or more certificates
/// to verify the peer with. This only makes sense when used in combination
/// with the SslVerifyPeer option.
///
CaInfo = 10065,
///
/// Pass a string naming a directory holding multiple CA certificates
/// to verify the peer with. The certificate directory must be prepared
/// using the openssl c_rehash utility. This only makes sense when used in
/// combination with the SslVerifyPeer option. The
/// CaPath function apparently does not work in Windows due
/// to some limitation in openssl. (Added in 7.9.8)
///
CaPath = 10097,
///
/// Pass an int. This option sets what policy libcurl should use when
/// the connection cache is filled and one of the open connections has to be
/// closed to make room for a new connection. This must be one of the
/// members. Use
/// to make
/// libcurl close the connection that was least recently used, that connection
/// is also least likely to be capable of re-use. Use
/// to make libcurl close
/// the oldest connection, the one that was created first among the ones in
/// the connection cache. The other close policies are not supported yet.
///
ClosePolicy = 72,
///
/// Time-out connect operations after this amount of seconds, if connects
/// are OK within this time, then fine... This only aborts the connect
/// phase. [Only works on unix-style/SIGALRM operating systems]
///
ConnectTimeout = 78,
///
/// Pass a string as parameter. It will be used to set a cookie
/// in the http request. The format of the string should be NAME=CONTENTS,
/// where NAME is the cookie name and CONTENTS is what the cookie should contain.
///
/// If you need to set multiple cookies, you need to set them all using a
/// single option and thus you need to concatenate them all in one single
/// string. Set multiple cookies in one string like this:
/// "name1=content1; name2=content2;" etc.
///
///
/// Using this option multiple times will only make the latest string override
/// the previously ones.
///
///
Cookie = 10022,
///
/// Pass a string as parameter. It should contain the name of your
/// file holding cookie data to read. The cookie data may be in Netscape /
/// Mozilla cookie data format or just regular HTTP-style headers dumped
/// to a file.
///
/// Given an empty or non-existing file, this option will enable cookies
/// for this CurlEasy object, making it understand and parse received cookies
/// and then use matching cookies in future request.
///
///
CookieFile = 10031,
///
/// Pass a file name as string. This will make libcurl write all
/// internally known cookies to the specified file when
/// is called. If no cookies are known, no file
/// will be created. Using this option also enables cookies for this
/// session, so if you for example follow a location it will make matching
/// cookies get sent accordingly.
///
/// If the cookie jar file can't be created or written to
/// (when is called), libcurl will not and
/// cannot report an error for this. Using Verbose or
/// CurlDebugCallback will get a warning to display, but that
/// is the only visible feedback you get about this possibly lethal situation.
///
///
CookieJar = 10082,
///
/// Pass a bool set to true to mark this as a new cookie
/// "session". It will force libcurl to ignore all cookies it is about to
/// load that are "session cookies" from the previous session. By default,
/// libcurl always stores and loads all cookies, independent of whether they are
/// session cookies. Session cookies are cookies without expiry date and they
/// are meant to be alive and existing for this "session" only.
///
CookieSession = 96,
///
/// Convert Unix newlines to CRLF newlines on transfers.
///
CRLF = 27,
///
/// Pass a string as parameter. It will be used instead of GET or
/// HEAD when doing an HTTP request, or instead of LIST or NLST when
/// doing an ftp directory listing. This is useful for doing DELETE or
/// other more or less obscure HTTP requests. Don't do this at will,
/// make sure your server supports the command first.
///
/// Restore to the internal default by setting this to null.
///
///
/// Many people have wrongly used this option to replace the entire
/// request with their own, including multiple headers and POST contents.
/// While that might work in many cases, it will cause libcurl to send
/// invalid requests and it could possibly confuse the remote server badly.
/// Use Post and PostFields to set POST data.
/// Use HttpHeader to replace or extend the set of headers
/// sent by libcurl. Use HttpVersion to change HTTP version.
///
///
CustomRequest = 10036,
///
/// Pass an object referene to whatever you want passed to your
/// delegate's extraData argument.
/// This reference is not used internally by libcurl, it is only passed to
/// the delegate.
///
DebugData = 10095,
///
/// Pass a reference to an delegate.
/// Verbose must be in effect. This delegate receives debug
/// information, as specified with the argument.
/// This function must return 0.
///
DebugFunction = 20094,
///
/// Pass an int, specifying the timeout in seconds. Name resolves
/// will be kept in memory for this number of seconds. Set to zero (0)
/// to completely disable caching, or set to -1 to make the cached
/// entries remain forever. By default, libcurl caches this info for 60
/// seconds.
///
DnsCacheTimeout = 92,
///
/// Not supported.
///
DnsUseGlobalCache = 91,
///
/// Pass a string containing the path name to the Entropy Gathering
/// Daemon socket. It will be used to seed the random engine for Ssl.
///
EgdSocket = 10077,
///
/// Set this option to the file name of your .netrc file you want libcurl to parse (using the CURLOPT_NETRC option). If
/// not set, libcurl will do a poor attempt to find the user's home directory and check for a .netrc file in there.
///
NetRcFile = 118,
///
/// Sets the contents of the Accept-Encoding: header sent in an HTTP request,
/// and enables decoding of a response when a Content-Encoding: header is
/// received. Three encodings are supported: identity, which does
/// nothing, deflate which requests the server to compress its
/// response using the zlib algorithm, and gzip which requests the
/// gzip algorithm. If a zero-length string is set, then an Accept-Encoding:
/// header containing all supported encodings is sent.
///
Encoding = 10102,
///
/// Not supported.
///
ErrorBuffer = 10010,
///
/// A true parameter tells the library to fail silently if the
/// HTTP code returned is equal to or larger than 300. The default
/// action would be to return the page normally, ignoring that code.
///
FailOnError = 45,
///
/// Pass a bool. If it is true, libcurl will attempt to get
/// the modification date of the remote document in this operation. This
/// requires that the remote server sends the time or replies to a time
/// querying command. The CurlEasy.GetInfo function with the
/// argument can be used after a
/// transfer to extract the received time (if any).
///
Filetime = 69,
///
/// A true parameter tells the library to follow any Location:
/// header that the server sends as part of an HTTP header.
///
/// this means that the library will re-send the same request on the
/// new location and follow new Location: headers all the way until no
/// more such headers are returned. MaxRedirs can be used
/// to limit the number of redirects libcurl will follow.
///
///
FollowLocation = 52,
///
/// Pass a bool. Set to true to make the next transfer
/// explicitly close the connection when done. Normally, libcurl keeps all
/// connections alive when done with one transfer in case there comes a
/// succeeding one that can re-use them. This option should be used with
/// caution and only if you understand what it does. Set to false
/// to have libcurl keep the connection open for possibly later re-use
/// (default behavior).
///
ForbidReuse = 75,
///
/// Pass a bool. Set to true to make the next transfer use a
/// new (fresh) connection by force. If the connection cache is full before
/// this connection, one of the existing connections will be closed as
/// according to the selected or default policy. This option should be used
/// with caution and only if you understand what it does. Set this to
/// false to have libcurl attempt re-using an existing connection
/// (default behavior).
///
FreshConnect = 74,
///
/// String that will be passed to the FTP server when it requests
/// account info.
///
FtpAccount = 10134,
///
/// A true parameter tells the library to append to the remote
/// file instead of overwrite it. This is only useful when uploading
/// to an ftp site.
///
FtpAppend = 50,
///
/// A true parameter tells the library to just list the names of
/// an ftp directory, instead of doing a full directory listing that
/// would include file sizes, dates etc.
///
/// This causes an FTP NLST command to be sent. Beware that some FTP
/// servers list only files in their response to NLST; they might not
/// include subdirectories and symbolic links.
///
///
FtpListOnly = 48,
///
/// Pass a string as parameter. It will be used to get the IP
/// address to use for the ftp PORT instruction. The PORT instruction
/// tells the remote server to connect to our specified IP address.
/// The string may be a plain IP address, a host name, an network
/// interface name (under Unix) or just a '-' letter to let the library
/// use your systems default IP address. Default FTP operations are
/// passive, and thus won't use PORT.
///
/// You disable PORT again and go back to using the passive version
/// by setting this option to NULL.
///
///
FtpPort = 10017,
///
/// When FTP over Ssl/TLS is selected (with FtpSsl),
/// this option can be used to change libcurl's default action which
/// is to first try "AUTH Ssl" and then "AUTH TLS" in this order,
/// and proceed when a OK response has been received.
///
/// Pass a member of the enumeration.
///
///
FtpSslAuth = 129,
///
/// Pass a bool. If the value is true, cURL will attempt to
/// create any remote directory that it fails to CWD into. CWD is the
/// command that changes working directory. (Added in 7.10.7)
///
FtpCreateMissingDirs = 110,
///
/// Pass an int. Causes libcurl to set a timeout period (in seconds)
/// on the amount of time that the server is allowed to take in order to
/// generate a response message for a command before the session is
/// considered hung. Note that while libcurl is waiting for a response, this
/// value overrides Timeout. It is recommended that if used in
/// conjunction with Timeout, you set
/// FtpResponseTimeout to a value smaller than
/// Timeout. (Added in 7.10.8)
///
FtpResponseTimeout = 112,
///
/// Pass a member of the enumeration.
///
FtpSsl = 119,
///
/// Pass a bool. If the value is true, it tells curl to use
/// the EPRT (and LPRT) command when doing active FTP downloads (which is
/// enabled by FtpPort). Using EPRT means that it will first attempt
/// to use EPRT and then LPRT before using PORT, but if you pass false
/// to this option, it will not try using EPRT or LPRT, only plain PORT.
/// (Added in 7.10.5)
///
FtpUseEprt = 106,
///
/// Pass a bool. If the value is true, it tells curl to use
/// the EPSV command when doing passive FTP downloads (which it always does
/// by default). Using EPSV means that it will first attempt to use EPSV
/// before using PASV, but if you pass false to this option, it will
/// not try using EPSV, only plain PASV.
///
FtpUseEpsv = 85,
///
/// A true parameter tells the library to include the header in
/// the body output. This is only relevant for protocols that actually
/// have headers preceding the data (like HTTP).
///
Header = 42,
///
/// Object reference to pass to the
/// delegate. Note that if you specify the CurlHeaderCallback,
/// this is the reference you'll get as the extraData parameter.
///
HeaderData = 10029,
///
/// Provide an delegate reference.
/// This delegate gets called by libcurl as soon as there is received
/// header data that needs to be written down. The headers are guaranteed
/// to be written one-by-one and only complete lines are written. Parsing
/// headers should be easy enough using this. The size of the data contained
/// in buf is size multiplied with nmemb.
/// Return the number of bytes actually written or return -1 to signal
/// error to the library (it will cause it to abort the transfer with a
/// return code).
///
HeaderFunction = 20079,
///
/// Pass an of aliases to be treated as valid HTTP
/// 200 responses. Some servers respond with a custom header response line.
/// For example, IceCast servers respond with "ICY 200 OK". By including
/// this string in your list of aliases, the response will be treated as a
/// valid HTTP header line such as "HTTP/1.0 200 OK". (Added in 7.10.3)
///
/// The alias itself is not parsed for any version strings. So if your alias
/// is "MYHTTP/9.9", libcurl will not treat the server as responding with
/// HTTP version 9.9. Instead libcurl will use the value set by option
/// HttpVersion.
///
///
Http200Aliases = 10104,
///
/// Pass an int as parameter, which is set to a bitmask
/// of , to tell libcurl what authentication
/// method(s) you want it to use. If more than one bit is set, libcurl will
/// first query the site to see what authentication methods it supports and
/// then pick the best one you allow it to use. Note that for some methods,
/// this will induce an extra network round-trip. Set the actual name and
/// password with the UserPwd option. (Added in 7.10.6)
///
HttpAuth = 107,
///
/// Pass a bool. If it's true, this forces the HTTP request
/// to get back to GET. Usable if a POST, HEAD, PUT or a custom request
/// has been used previously using the same object.
///
HttpGet = 80,
///
/// Pass an reference containing HTTP headers to pass to
/// the server in your HTTP request. If you add a header that is otherwise
/// generated and used by libcurl internally, your added one will be used
/// instead. If you add a header with no contents as in 'Accept:' (no data
/// on the right side of the colon), the internally used header will get
/// disabled. Thus, using this option you can add new headers, replace
/// internal headers and remove internal headers. The headers included in the
/// CurlSlist must not be CRLF-terminated, because curl adds CRLF after
/// each header item. Failure to comply with this will result in strange bugs
/// because the server will most likely ignore part of the headers you specified.
///
/// The first line in a request (usually containing a GET or POST) is not
/// a header and cannot be replaced using this option. Only the lines
/// following the request-line are headers.
///
///
/// Pass a null to this to reset back to no custom headers.
///
///
/// The most commonly replaced headers have "shortcuts" in the options
/// Cookie, UserAgent and Referer.
///
///
HttpHeader = 10023,
///
/// Tells libcurl you want a multipart/formdata HTTP POST to be made and you
/// instruct what data to pass on to the server. Pass a reference to a
/// object as parameter.
/// The best and most elegant way to do this, is to use
/// as documented.
///
/// Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue"
/// header. You can disable this header with HttpHeader as usual.
///
///
HttpPost = 10024,
///
/// Set the parameter to true to get the library to tunnel all
/// operations through a given HTTP proxy. Note that there is a big
/// difference between using a proxy and tunneling through it. If you
/// don't know what this means, you probably don't want this tunneling option.
///
HttpProxyTunnel = 61,
///
/// Pass a member of the enumeration. These
/// values force libcurl to use the specific HTTP versions. This is not
/// sensible to do unless you have a good reason.
///
HttpVersion = 84,
///
/// Provide an delegate reference.
/// This delegate gets called by libcurl when an IOCTL operation,
/// such as a rewind of a file being sent via FTP, is required on
/// the client side.
///
IoctlFunction = 20130,
///
/// Provide an object, such as a FileStream, upon which
/// you may need to perform an IOCTL operation. Right now, only
/// rewind is supported.
///
IoctlData = 10131,
///
/// When uploading a file to a remote site, this option should be used to
/// tell libcurl what the expected size of the infile is. This value should
/// be passed as an int.
///
InfileSize = 14,
///
/// When uploading a file to a remote site, this option should be used to
/// tell libcurl what the expected size of the infile is. This value should
/// be passed as a long. (Added in 7.11.0)
///
InFileSizeLarge = 30115,
///
/// Pass a string as parameter. This sets the interface name to use
/// as the outgoing network interface. The name can be an interface name,
/// an IP address or a host name.
///
Interface = 10062,
///
/// Pass one of the members of the enumeration.
///
IpResolve = 113,
///
/// Pass a string as parameter. Set the kerberos4 security level;
/// this also enables kerberos4 awareness. This is a string, 'clear', 'safe',
/// 'confidential' or 'private'. If the string is set but doesn't match
/// one of these, 'private' will be used. Set the string to null
/// to disable kerberos4. The kerberos support only works for FTP.
///
Krb4Level = 10063,
///
/// Pass an int as parameter. It contains the transfer speed in bytes
/// per second that the transfer should be below during
/// LowSpeedTime seconds for the library to consider it
/// too slow and abort.
///
LowSpeedLimit = 19,
///
/// Pass an int as parameter. It contains the time in seconds that
/// the transfer should be below the LowSpeedLimit for the
/// library to consider it too slow and abort.
///
LowSpeedTime = 20,
///
/// Pass an int. The set number will be the persistent connection
/// cache size. The set amount will be the maximum amount of simultaneously
/// open connections that libcurl may cache. Default is 5, and there isn't
/// much point in changing this value unless you are perfectly aware of how
/// this works and changes libcurl's behaviour. This concerns connections
/// using any of the protocols that support persistent connections.
///
/// When reaching the maximum limit, cURL uses the ClosePolicy
/// to figure out which of the existing connections to close to prevent the
/// number of open connections to increase.
///
///
/// if you already have performed transfers with this CurlEasy object, setting a
/// smaller MaxConnects than before may cause open connections
/// to get closed unnecessarily.
///
///
MaxConnects = 71,
///
/// Pass an int as parameter. This allows you to specify the maximum
/// size (in bytes) of a file to download. If the file requested is larger
/// than this value, the transfer will not start and
/// will be returned.
///
/// The file size is not always known prior to download, and for such files
/// this option has no effect even if the file transfer ends up being larger
/// than this given limit. This concerns both FTP and HTTP transfers.
///
///
MaxFileSize = 114,
///
/// Pass a long as parameter. This allows you to specify the
/// maximum size (in bytes) of a file to download. If the file requested
/// is larger than this value, the transfer will not start and
/// will be returned.
/// (Added in 7.11.0)
///
/// The file size is not always known prior to download, and for such files
/// this option has no effect even if the file transfer ends up being larger
/// than this given limit. This concerns both FTP and HTTP transfers.
///
///
MaxFileSizeLarge = 30117,
///
/// Pass an int. The set number will be the redirection limit. If
/// that many redirections have been followed, the next redirect will cause
/// an error (TooManyRedirects). This option only makes sense
/// if the FollowLocation is used at the same time.
///
MaxRedirs = 68,
///
/// This parameter controls the preference of libcurl between using
/// user names and passwords from your ~/.netrc file, relative to
/// user names and passwords in the URL supplied with Url.
///
/// libcurl uses a user name (and supplied or prompted password)
/// supplied with UserPwd in preference to any of the
/// options controlled by this parameter.
///
///
/// Pass a member of the enumeration.
///
///
/// Only machine name, user name and password are taken into account
/// (init macros and similar things aren't supported).
///
///
/// libcurl does not verify that the file has the correct properties
/// set (as the standard Unix ftp client does). It should only be
/// readable by user.
///
///
Netrc = 51,
///
/// Pass a string as parameter, containing the full path name to the
/// file you want libcurl to use as .netrc file. If this option is omitted,
/// and Netrc is set, libcurl will attempt to find the a
/// .netrc file in the current user's home directory. (Added in 7.10.9)
///
NetrcFile = 10118,
///
/// A true parameter tells the library to not include the
/// body-part in the output. This is only relevant for protocols that
/// have separate header and body parts. On HTTP(S) servers, this
/// will make libcurl do a HEAD request.
///
/// To change back to GET, you should use HttpGet. To
/// change back to POST, you should use Post. Setting
/// NoBody to false has no effect.
///
///
NoBody = 44,
///
/// A true parameter tells the library to shut off progress
/// reporting.
///
NoProgress = 43,
///
/// Pass a bool. If it is true, libcurl will not use any
/// functions that install signal handlers or any functions that cause
/// signals to be sent to the process. This option is mainly here to allow
/// multi-threaded unix applications to still set/use all timeout options
/// etc, without risking getting signals. (Added in 7.10)
///
/// Consider using libcurl with ares built-in to enable asynchronous Dns
/// lookups. It enables nice timeouts for name resolves without signals.
///
///
NoSignal = 99,
///
/// Not supported.
///
PasvHost = 126,
///
/// Pass an int specifying what remote port number to connect to,
/// instead of the one specified in the URL or the default port for the
/// used protocol.
///
Port = 3,
///
/// A true parameter tells the library to do a regular HTTP post.
/// This will also make the library use the a "Content-Type:
/// application/x-www-form-urlencoded" header. (This is by far the most
/// commonly used POST method).
///
/// Use the PostFields option to specify what data to post
/// and PostFieldSize to set the data size. Optionally,
/// you can provide data to POST using the CurlReadCallback and
/// ReadData options.
///
///
/// You can override the default POST Content-Type: header by setting
/// your own with HttpHeader.
///
///
/// Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue"
/// header. You can disable this header with HttpHeader as usual.
///
///
/// If you use POST to a HTTP 1.1 server, you can send data without knowing
/// the size before starting the POST if you use chunked encoding. You
/// enable this by adding a header like "Transfer-Encoding: chunked" with
/// HttpHeader. With HTTP 1.0 or without chunked transfer,
/// you must specify the size in the request.
///
///
/// if you have issued a POST request and want to make a HEAD or GET instead,
/// you must explictly pick the new request type using NoBody
/// or HttpGet or similar.
///
///
Post = 47,
///
/// Pass a string as parameter, which should be the full data to post
/// in an HTTP POST operation. You must make sure that the data is formatted
/// the way you want the server to receive it. libcurl will not convert or
/// encode it for you. Most web servers will assume this data to be
/// url-encoded. Take note.
///
/// This POST is a normal application/x-www-form-urlencoded kind (and
/// libcurl will set that Content-Type by default when this option is used),
/// which is the most commonly used one by HTML forms. See also the
/// Post. Using PostFields implies
/// Post.
///
///
/// Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue"
/// header. You can disable this header with HttpHeader as usual.
///
///
/// to make multipart/formdata posts (aka rfc1867-posts), check out the
/// HttpPost option.
///
///
PostFields = 10015,
///
/// If you want to post data to the server without letting libcurl do a
/// strlen() to measure the data size, this option must be used. When
/// this option is used you can post fully binary data, which otherwise
/// is likely to fail. If this size is set to zero, the library will use
/// strlen() to get the size.
///
PostFieldSize = 60,
///
/// Pass a long as parameter. Use this to set the size of the
/// PostFields data to prevent libcurl from doing
/// strlen() on the data to figure out the size. This is the large
/// file version of the PostFieldSize option. (Added in 7.11.1)
///
PostFieldSizeLarge = 30120,
///
/// Pass an of FTP commands to pass to the server after
/// your ftp transfer request. Disable this operation again by setting this
/// option to null.
///
Postquote = 10039,
///
/// Pass an containing the FTP commands to pass to
/// the server after the transfer type is set. Disable this operation
/// again by setting a null to this option.
///
Prequote = 10093,
///
/// Pass an object as parameter, referencing data that should be
/// associated with this object. The object can
/// subsequently be retrieved using CurlEasy.GetInfo with the
/// option. libcurl itself does
/// nothing with this data. (Added in 7.10.3)
///
Private = 10103,
///
/// Pass an object reference that will be untouched by libcurl
/// and passed as the first argument in the progress delegate set with
/// CurlProgressCallback.
///
ProgressData = 10057,
///
/// Pass an delegate reference. This
/// delegate gets called by libcurl at a frequent interval during data
/// transfer. Unknown/unused argument values will be set to zero (like if
/// you only download data, the upload size will remain 0). Returning a
/// non-zero value from this delegate will cause libcurl to abort the
/// transfer and return .
///
/// NoProgress must be set to false to make this
/// function actually get called.
///
///
ProgressFunction = 20056,
///
/// Set HTTP proxy to use. The parameter should be a string holding
/// the host name or dotted IP address. To specify port number in this
/// string, append :[port] to the end of the host name. The proxy
/// string may be prefixed with [protocol]:// since any such prefix
/// will be ignored. The proxy's port number may optionally be specified
/// with the separate option ProxyPort.
///
/// NOTE: when you tell the library to use an HTTP proxy, libcurl will
/// transparently convert operations to HTTP even if you specify an FTP
/// URL etc. This may have an impact on what other features of the library
/// you can use, such as Quote and similar FTP specifics
/// that don't work unless you tunnel through the HTTP proxy. Such tunneling
/// is activated with HttpProxyTunnel.
///
///
Proxy = 10004,
///
/// Pass a bitmask of as the paramter, to tell
/// libcurl what authentication method(s) you want it to use for your proxy
/// authentication. If more than one bit is set, libcurl will first query the
/// site to see what authentication methods it supports and then pick the best
/// one you allow it to use. Note that for some methods, this will induce an
/// extra network round-trip. Set the actual name and password with the
/// ProxyUserPwd option. The bitmask can be constructed by
/// or'ing together the bits. As of this writing,
/// only and
/// work. (Added in 7.10.7)
///
ProxyAuth = 111,
///
/// Pass an int with this option to set the proxy port to connect
/// to unless it is specified in the proxy string Proxy.
///
ProxyPort = 59,
///
/// Pass a to set type of the proxy.
///
ProxyType = 101,
///
/// Pass a string as parameter, which should be
/// [user name]:[password] to use for the connection to the
/// HTTP proxy. Use ProxyAuth to decide authentication method.
///
ProxyUserPwd = 10006,
///
/// A true parameter tells the library to use HTTP PUT to transfer
/// data. The data should be set with ReadData and
/// InfileSize.
///
/// This option is deprecated and starting with version 7.12.1 you should
/// instead use Upload.
///
///
Put = 54,
///
/// Pass a reference to an containing FTP commands to
/// pass to the server prior to your ftp request. This will be done before
/// any other FTP commands are issued (even before the CWD command).
/// Disable this operation again by setting a null to this option.
///
Quote = 10028,
///
/// Pass a string containing the file name. The file will be used
/// to read from to seed the random engine for Ssl. The more random the
/// specified file is, the more secure the Ssl connection will become.
///
RandomFile = 10076,
///
/// Pass a string as parameter, which should contain the
/// specified range you want. It should be in the format X-Y, where X
/// or Y may be left out. HTTP transfers also support several intervals,
/// separated with commas as in X-Y,N-M. Using this kind of multiple
/// intervals will cause the HTTP server to send the response document
/// in pieces (using standard MIME separation techniques). Pass a
/// null to this option to disable the use of ranges.
///
Range = 10007,
///
/// Object reference to pass to the
/// delegate. Note that if you specify the CurlReadCallback,
/// this is the reference you'll get as input.
///
ReadData = 10009,
///
/// Pass a reference to an delegate.
/// This delegate gets called by libcurl as soon as it needs to read data
/// in order to send it to the peer. The data area referenced by the
/// buf may be filled with at most size multiplied with
/// nmemb number of bytes. Your function must return the actual
/// number of bytes that you stored in that byte array. Returning 0 will
/// signal end-of-file to the library and cause it to stop the current transfer.
///
/// If you stop the current transfer by returning 0 "pre-maturely"
/// (i.e before the server expected it, like when you've told you will
/// upload N bytes and you upload less than N bytes), you may experience that
/// the server "hangs" waiting for the rest of the data that won't come.
///
///
ReadFunction = 20012,
///
/// Pass a string as parameter. It will be used to set the Referer:
/// header in the http request sent to the remote server. This can be used
/// to fool servers or scripts. You can also set any custom header with
/// HttpHeader.
///
Referer = 10016,
///
/// Pass an int as parameter. It contains the offset in number of
/// bytes that you want the transfer to start from. Set this option to 0
/// to make the transfer start from the beginning (effectively disabling resume).
///
ResumeFrom = 21,
///
/// Pass a long as parameter. It contains the offset in number of
/// bytes that you want the transfer to start from. (Added in 7.11.0)
///
ResumeFromLarge = 30116,
///
/// Pass an initialized reference as a parameter.
/// Setting this option will make this object use the
/// data from the CurlShare object instead of keeping the data to itself. This
/// enables several CurlEasy objects to share data. If the CurlEasy objects are used
/// simultaneously, you MUST use the CurlShare object's locking methods.
/// See for details.
///
Share = 10100,
///
/// Not supported.
///
SourceHost = 10122,
///
/// Not supported.
///
SourcePath = 10124,
///
/// Not supported.
///
SourcePort = 125,
///
/// When doing a third-party transfer, set the source post-quote list,
/// as an .
///
SourcePostquote = 10128,
///
/// When doing a third-party transfer, set the source pre-quote list,
/// as an .
///
SourcePrequote = 10127,
///
/// When doing a third-party transfer, set a quote list,
/// as an .
///
SourceQuote = 10133,
///
/// Set the source URL for a third-party transfer.
///
SourceUrl = 10132,
///
/// When doing 3rd party transfer, set the source user and password, as
/// a string with format user:password.
///
SourceUserpwd = 10123,
///
/// Pass a string as parameter. The string should be the file name
/// of your certificate. The default format is "PEM" and can be changed
/// with SslCertType.
///
SslCert = 10025,
///
/// Pass a string as parameter. It will be used as the password
/// required to use the SslCert certificate.
///
/// This option is replaced by SslKeyPasswd and should only
/// be used for backward compatibility. You never needed a pass phrase to
/// load a certificate but you need one to load your private key.
///
///
SslCertPasswd = 10026,
///
/// Pass a string as parameter. The string should be the format of
/// your certificate. Supported formats are "PEM" and "DER". (Added in 7.9.3)
///
SslCertType = 10086,
///
/// Pass a string as parameter. It will be used as the identifier
/// for the crypto engine you want to use for your private key.
///
/// If the crypto device cannot be loaded,
/// is returned.
///
///
SslEngine = 10089,
///
/// Sets the actual crypto engine as the default for (asymmetric)
/// crypto operations.
///
/// If the crypto device cannot be set,
/// is returned.
///
///
SslEngineDefault = 90,
///
/// Pass a string as parameter. The string should be the file name
/// of your private key. The default format is "PEM" and can be changed
/// with SslKeyType.
///
SslKey = 10087,
///
/// Pass a string as parameter. It will be used as the password
/// required to use the SslKey private key.
///
SslKeyPasswd = 10026,
///
/// Pass a string as parameter. The string should be the format of
/// your private key. Supported formats are "PEM", "DER" and "ENG".
///
/// The format "ENG" enables you to load the private key from a crypto
/// engine. In this case SslKey is used as an identifier
/// passed to the engine. You have to set the crypto engine with
/// SslEngine. "DER" format key file currently does not
/// work because of a bug in OpenSSL.
///
///
SslKeyType = 10088,
///
/// Pass a member of the enumeration as the
/// parameter to set the Ssl version to use. By default
/// the Ssl library will try to solve this by itself although some servers
/// servers make this difficult why you at times may have to use this
/// option.
///
SslVersion = 32,
///
/// Pass a string holding the list of ciphers to use for the Ssl
/// connection. The list must be syntactically correct, it consists of
/// one or more cipher strings separated by colons. Commas or spaces are
/// also acceptable separators but colons are normally used, !, - and +
/// can be used as operators. Valid examples of cipher lists include
/// 'RC4-SHA', ´SHA1+DES´, 'Tlsv1' and 'DEFAULT'. The default list is
/// normally set when you compile OpenSSL.
///
/// You'll find more details about cipher lists on this URL:
/// http://www.openssl.org/docs/apps/ciphers.html
///
///
SslCipherList = 10083,
///
/// Pass an int. Set if we should verify the common name from the
/// peer certificate in the Ssl handshake, set 1 to check existence, 2 to
/// ensure that it matches the provided hostname. This is by default set
/// to 2. (default changed in 7.10)
///
SslVerifyhost = 81,
///
/// Pass a bool that is set to false to stop curl from
/// verifying the peer's certificate (7.10 starting setting this option
/// to non-zero by default). Alternate certificates to verify against
/// can be specified with the CaInfo option or a
/// certificate directory can be specified with the CaPath
/// option. As of 7.10, curl installs a default bundle.
/// SslVerifyhost may also need to be set to 1
/// or 0 if SslVerifyPeer is disabled (it defaults to 2).
///
SslVerifyPeer = 64,
///
/// Not supported.
///
Stderr = 10037,
///
/// Pass a bool specifying whether the TCP_NODELAY option should be
/// set or cleared (true = set, false = clear). The option is
/// cleared by default. This will have no effect after the connection has
/// been established.
///
/// Setting this option will disable TCP's Nagle algorithm. The purpose of
/// this algorithm is to try to minimize the number of small packets on the
/// network (where "small packets" means TCP segments less than the Maximum
/// Segment Size (MSS) for the network).
///
///
/// Maximizing the amount of data sent per TCP segment is good because it
/// amortizes the overhead of the send. However, in some cases (most notably
/// telnet or rlogin) small segments may need to be sent without delay. This
/// is less efficient than sending larger amounts of data at a time, and can
/// contribute to congestion on the network if overdone.
///
///
TcpNoDelay = 121,
///
/// Pass a bool specifying whether to ignore Content-Length
///
IgnoreContentLength = 136,
///
/// Set to true to skip the IP address received in a 227 PASV FTP server response. Typically used for FTP-SSL purposes
/// but is not restricted to that. libcurl will then instead use the same IP address it used for the control
/// connection.
///
FtpSkipPasvIp = 137,
///
/// Provide an with variables to pass to the telnet
/// negotiations. The variables should be in the format "option=value".
/// libcurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See
/// the TELNET standard for details.
///
TelnetOptions = 10070,
///
/// Pass a member of the enumeration as
/// parameter. This defines how the TimeValue time
/// value is treated. This feature applies to HTTP and FTP.
///
/// The last modification time of a file is not always known and in such
/// instances this feature will have no effect even if the given time
/// condition would have not been met.
///
///
TimeCondition = 33,
///
/// Pass a int as parameter containing the maximum time in seconds
/// that you allow the libcurl transfer operation to take. Normally, name
/// lookups can take a considerable time and limiting operations to less
/// than a few minutes risk aborting perfectly normal operations. This
/// option will cause curl to use the SIGALRM to enable time-outing
/// system calls.
///
/// this is not recommended to use in unix multi-threaded programs,
/// as it uses signals unless NoSignal (see above) is set.
///
///
Timeout = 13,
///
/// Pass a as parameter. This time will be
/// used in a condition as specified with TimeCondition.
///
TimeValue = 34,
///
/// A true parameter tells the library to use ASCII mode for ftp
/// transfers, instead of the default binary transfer. For LDAP transfers
/// it gets the data in plain text instead of HTML and for win32 systems
/// it does not set the stdout to binary mode. This option can be usable
/// when transferring text data between systems with different views on
/// certain characters, such as newlines or similar.
///
TransferText = 53,
///
/// A true parameter tells the library it can continue to send
/// authentication (user+password) when following locations, even when
/// hostname changed. Note that this is meaningful only when setting
/// FollowLocation.
///
UnrestrictedAuth = 105,
///
/// A true parameter tells the library to prepare for an
/// upload. The ReadData and InfileSize
/// or InFileSizeLarge are also interesting for uploads.
/// If the protocol is HTTP, uploading means using the PUT request
/// unless you tell libcurl otherwise.
///
/// Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue"
/// header. You can disable this header with HttpHeader as usual.
///
///
/// If you use PUT to a HTTP 1.1 server, you can upload data without
/// knowing the size before starting the transfer if you use chunked
/// encoding. You enable this by adding a header like
/// "Transfer-Encoding: chunked" with HttpHeader. With
/// HTTP 1.0 or without chunked transfer, you must specify the size.
///
///
Upload = 46,
///
/// The actual URL to deal with. The parameter should be a string.
/// If the given URL lacks the protocol part ("http://" or "ftp://" etc), it
/// will attempt to guess which protocol to use based on the given host name.
///
/// If the given protocol of the set URL is not supported, libcurl will return
/// an error CurlCode.()
/// when you call CurlEasy's or
/// CurlMulti's .
///
///
/// Use for detailed info
/// on which protocols that are supported.
///
///
Url = 10002,
///
/// Pass a string as parameter. It will be used to set the
/// User-Agent: header in the http request sent to the remote server.
/// This can be used to fool servers or scripts. You can also set any
/// custom header with HttpHeader.
///
UserAgent = 10018,
///
/// Pass a string as parameter, which should be
/// [user name]:[password] to use for the connection. Use
/// HttpAuth to decide authentication method.
///
/// When using HTTP and FollowLocation, libcurl might
/// perform several requests to possibly different hosts. libcurl will
/// only send this user and password information to hosts using the
/// initial host name (unless UnrestrictedAuth is set),
/// so if libcurl follows locations to other hosts it will not send the
/// user and password to those. This is enforced to prevent accidental
/// information leakage.
///
///
UserPwd = 10005,
///
/// Set the parameter to true to get the library to display a lot
/// of verbose information about its operations. Very useful for libcurl
/// and/or protocol debugging and understanding. The verbose information
/// will be sent to the delegate, if it's
/// implemented. You hardly ever want this set in production use, you will
/// almost always want this when you debug/report problems.
///
Verbose = 41,
///
/// Object reference to pass to the
/// delegate. Note that if you specify the CurlWriteCallback,
/// this is the object you'll get as input.
///
WriteData = 10001,
///
/// Pass a reference to an delegate.
/// The delegate gets called by libcurl as soon as there is data received
/// that needs to be saved. The size of the data referenced by buf
/// is size multiplied with nmemb, it will not be zero
/// terminated. Return the number of bytes actually taken care of. If
/// that amount differs from the amount passed to your function, it'll
/// signal an error to the library and it will abort the transfer and
/// return CurlCode..
///
/// This function may be called with zero bytes data if the
/// transfered file is empty.
///
///
WriteFunction = 20011,
///
/// Pass a string of the output using full variable-replacement
/// as described elsewhere.
///
WriteInfo = 10040,
///
/// Set to true to enable the "TE:" header in HTTP requests to ask for compressed transfer-encoded responses. Set to 0
/// to disable the use of TE: in outgoing requests. The current default is false, but it might change in a future
/// libcurl release. libcurl will ask for the compressed methods it knows of, and if that isn't any, it will not ask
/// for transfer-encoding at all even if this option is set to true.
///
TransferEncoding = 207,
///
/// Callback function for closing socket (instead of close(2)). The callback should have type curl_closesocket_callback
///
CloseSocketFunction = 20208,
CloseSocketData = 10209,
///
/// feed cookies into cookie engine
///
CookieList = 10135,
///
/// Select "file method" to use when doing FTP, see the curl_ftpmethod above.
///
FtpFileMethod = 138,
///
/// Local port number to bind the socket to
///
LocalPort = 139,
///
/// Number of ports to try, including the first one set with LocalPort. Thus, setting it to 1 will make no additional
/// attempts but the first.
///
LocalPortRange = 140,
///
/// No transfer, set up connection and let application use the socket by extracting it with CURLINFO_LASTSOCKET
///
ConnectOnly = 141,
///
/// if the connection proceeds too quickly then need to slow it down limit-rate: maximum number of bytes per second to
/// send or receive
///
MaxSendSpeedLarge = 30145,
MaxRecvSpeedLarge = 30146,
///
/// Pointer to command string to send if USER/PASS fails.
///
FtpAlternativeToUser = 10147,
///
/// Callback function for setting socket options
///
SockoptFunction = 20148,
SockoptData = 149,
///
/// Set to false to disable session ID re-use for this transfer, default is enabled (== true)
///
SslSessionidCache = 150,
///
/// Allowed SSH authentication methods
///
SshAuthTypes = 151,
///
/// Used by scp/sftp to do public/private key authentication
///
SshPublicKeyfile = 10152,
SshPrivateKeyfile = 10152,
///
/// Same as Timeout and ConnectTimeout, but with ms resolution
///
TimeoutMs = 155,
ConnectTimeoutMs = 156,
///
/// Set to false to disable the libcurl's decoding and thus pass the raw body data to the application even when it is
/// encoded/compressed
///
HttpTransferDecoding = 157,
HttpContentDecoding = 158,
///
/// Permission used when creating new files and directories on the remote server for protocols that support it,
/// SFTP/SCP/FILE
///
NewFilePerms = 159,
NewDirectoryPerms = 160,
///
/// Set the behaviour of POST when redirecting. Values must be set to one of CURL_REDIR* defines below. This used to be
/// called CURLOPT_POST301
///
PostRedir = 161,
///
/// Used by scp/sftp to verify the host's public key
///
SshHostPublicKeyMd5 = 10162,
///
/// Callback function for opening socket (instead of socket(2)). Optionally, callback is able change the address or
/// refuse to connect returning CURL_SOCKET_BAD. The callback should have type curl_opensocket_callback
///
OpenSocketFunction = 20163,
OpenSocketData = 10164,
///
/// POST volatile input fields.
///
CopyPostFields = 10165,
///
/// set transfer mode (;type=) when doing FTP via an HTTP proxy
///
ProxyTransferMode = 166,
///
/// Callback function for seeking in the input stream
///
SeekFunction = 20167,
SeekData = 10168,
///
/// CRL file
///
CrlFile = 10169,
///
/// Issuer certificate
///
IssuerCert = 10170,
///
/// (IPv6) Address scope
///
AddressScope = 171,
///
/// Collect certificate chain info and allow it to get retrievable with CURLINFO_CERTINFO after the transfer is
/// complete.
///
CertInfo = 172,
///
/// "name" and "pwd" to use when fetching.
///
Username = 10173,
Password = 10174,
///
/// "name" and "pwd" to use with Proxy when fetching.
///
ProxyUsername = 10175,
ProxyPassword = 10176,
///
/// Comma separated list of hostnames defining no-proxy zones. These should match both hostnames directly, and
/// hostnames within a domain. For example, local.com will match local.com and www.local.com, but NOT notlocal.com or
/// www.notlocal.com. For compatibility with other implementations of this, .local.com will be considered to be the
/// same as local.com. A single * is the only valid wildcard, and effectively disables the use of proxy.
///
NoProxy = 10177,
///
/// block size for TFTP transfers
///
TftpBlksize = 178,
///
/// Socks service
///
Socks5GssApiService = 10179,
Socks5GssApiNec = 180,
///
/// set the bitmask for the protocols that are allowed to be used for the transfer, which thus helps the app which
/// takes URLs from users or other external inputs and want to restrict what protocol(s) to deal with. Defaults to
/// CURLPROTO_ALL.
///
Protocols = 181,
///
/// set the bitmask for the protocols that libcurl is allowed to follow to, as a subset of the CURLOPT_PROTOCOLS ones.
/// That means the protocol needs to be set in both bitmasks to be allowed to get redirected to. Defaults to all
/// protocols except FILE and SCP.
///
RedirProtocols = 182,
///
/// Set the SSH knownhost file name to use
///
SshKnownHosts = 10183,
///
/// set the SSH host key callback, must point to a curl_sshkeycallback function
///
SshKeyFunction = 20184,
///
/// Set the SSH host key callback custom pointer
///
SshKeydata = 10185,
///
/// Set the SMTP mail originator
///
MailFrom = 10186,
///
/// Set the SMTP mail receiver(s)
///
MailRcpt = 10187,
///
/// FTP: send PRET before PASV
///
FtpUsePret = 188,
///
/// Set the interface string to use as outgoing network interface for DNS requests. Only supported by the c-ares DNS
/// backend */
///
DnsInterface = 10221,
///
/// Set the local IPv4 address to use for outgoing DNS requests. Only supported by the c-ares DNS backend
///
DnsLocalIp4 = 10222,
///
/// Set the local IPv6 address to use for outgoing DNS requests. Only supported by the c-ares DNS backend
///
DnsLocalIp6 = 10223,
///
/// Set authentication options directly
///
LoginOptions = 10224,
///
/// Enable/disable TLS NPN extension (http2 over ssl might fail without)
///
SslEnableNpn = 225,
///
/// Enable/disable TLS ALPN extension (http2 over ssl might fail without)
///
SslEnableAlpn = 226,
///
/// Time to wait for a response to a HTTP request containing an Expect: 100-continue header before sending the data
/// anyway.
///
Expect100TimeoutMs = 227,
///
/// This points to a linked list of headers used for proxy requests only, struct curl_slist kind
///
ProxyHeader = 228,
///
/// Pass in a bitmask of "header options"
///
HeaderOpt = 229,
///
/// Last numeric entry in the enumeration. Don't use this in your
/// application code.
///
LastEntry = 230,
};
}