CURLNMBS class constants

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

CURLNMBS constants

Constants

Constant Value Description
kUpkeepIntervalDefault 50000 The default connection upkeep interval in milliseconds.
kWebSocketRaw 1 One of the options for web sockets. RAW mode for WebSocketOptions.

Authorization

Constant Value Description
kAUTH_ANY &hFFFFFFEF all types set
kAUTH_ANYSAFE &hFFFFFFEE
kAUTH_AWS_SIGV4 128 AWS Signature v4
kAUTH_BASIC 1 Basic (default)
kAUTH_Bearer 64 HTTP Bearer token authentication
kAUTH_DIGEST 2 Digest
kAUTH_DIGEST_IE 16 HTTP Digest authentication with an IE flavor. Digest authentication is defined in RFC 2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libCURL will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use.
kAUTH_GSSNEGOTIATE 4 GSS-Negotiate

Please check SupportsGSSNEGOTIATE property in CURLNVersionMBS class whether this is supported/implemented by your copy of the CURL library.
kAUTH_NEGOTIATE 4 HTTP Negotiate (SPNEGO) authentication. Negotiate authentication is defined in RFC 4559 and is the most secure way to perform authentication over HTTP. more
kAUTH_NONE 0
kAUTH_NTLM 8
kAUTH_NTLM_WB 32 NTLM delegating to winbind helper. Authentication is performed by a separate binary application that is executed when needed. The name of the application is specified at compile time but is typically /usr/bin/ntlm_auth more
kAUTH_Only &h80000000 This is a meta symbol. OR this value together with a single specific auth value to force libCURL to probe for un-restricted auth and if not, only that single auth algorithm is acceptable.

ChunkBegin result values

Constant Value Description
kChunkBeginFailed 1 Failed, so we exit downloads.
kChunkBeginOK 0 OK, download this file.
kChunkBeginSkip 2 Skip the file.

ChunkEnd result values

Constant Value Description
kChunkEndFailed 1 Failed, so we exit downloads.
kChunkEndOK 0 Download success.

Error Constants

Constant Value Description
kError_ABORTED_BY_CALLBACK 42
kError_AGAIN 81 socket is not ready for send/recv, wait till it's ready and try again (Added in CURL 7.18.2)
kError_Auth_Error 94 An authentication function returned an error.
kError_BAD_CONTENT_ENCODING 61 Unrecognized transfer encoding
kError_BAD_DOWNLOAD_RESUME 36 couldn't resume download
kError_BAD_FUNCTION_ARGUMENT 43
kError_CHUNK_FAILED 88 Chunk event reported error.
kError_CONV_REQD 76 Not used with plugin.
kError_COULDNT_CONNECT 7 Could not connect. Proxy set? Firewall open?
kError_COULDNT_RESOLVE_HOST 6
kError_COULDNT_RESOLVE_PROXY 5
kError_FAILED_INIT 2
kError_FILESIZE_EXCEEDED 63 Maximum file size exceeded
kError_FILE_COULDNT_READ_FILE 37
kError_FTP_ACCEPT_FAILED 10 While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar.
kError_FTP_ACCEPT_TIMEOUT 12 During an active FTP session while waiting for the server to connect, the OptionAcceptTimeoutMS (or the internal default) timeout expired.
kError_FTP_BAD_FILE_LIST 87 Unable to parse FTP file list.
kError_FTP_CANT_GET_HOST 15
kError_FTP_COULDNT_RETR_FILE 19
kError_FTP_COULDNT_SET_TYPE 17
kError_FTP_COULDNT_USE_REST 31 the REST command failed
kError_FTP_PORT_FAILED 30 FTP PORT operation failed
kError_FTP_PRET_FAILED 84 a PRET command failed
kError_FTP_WEIRD_227_FORMAT 14
kError_FTP_WEIRD_PASS_REPLY 11
kError_FTP_WEIRD_PASV_REPLY 13
kError_FTP_WEIRD_SERVER_REPLY 8
kError_FUNCTION_NOT_FOUND 41
kError_GOT_NOTHING 52 when this is a specific error
kError_HTTP2 16 A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error buffer for details.
kError_HTTP2_STREAM 92 stream error in HTTP/2 framing layer
kError_HTTP3 95 HTTP3 layer failed.
kError_HTTP_POST_ERROR 34
kError_HTTP_RETURNED_ERROR 22
kError_INTERFACE_FAILED 45
kError_LDAP_CANNOT_BIND 38
kError_LDAP_INVALID_URL 62 Invalid LDAP URL
kError_LDAP_SEARCH_FAILED 39
kError_LOGIN_DENIED 67 user, password or similar was not accepted and we failed to login
kError_NOT_BUILT_IN 4 A requested feature, protocol or option was not found built-in in this libCURL due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libCURL was built and in order to get it to function you have to get a rebuilt libCURL.
kError_NO_CONNECTION_AVAILABLE 89 For internal use only, will never be returned by libCURL.
No connection available, the session will be queued. (added in 7.30.0)
kError_OK 0
kError_OPERATION_TIMEDOUT 28
kError_OUT_OF_MEMORY 27
kError_PARTIAL_FILE 18
kError_PEER_FAILED_VERIFICATION 60
kError_Proxy 96 Proxy handshake error.
kError_Quic_Connect_Error 96 Quic had a connect error.
kError_QUOTE_ERROR 21
kError_RANGE_ERROR 33
kError_READ_ERROR 26 could open/read from file
kError_RECURSIVE_API_CALL 93 an api function was called from inside an event.
kError_RECV_ERROR 56 failure in receiving network data
kError_REMOTE_ACCESS_DENIED 9
kError_REMOTE_DISK_FULL 70 Out of disk space on server.
kError_REMOTE_FILE_EXISTS 73 File already exists.
kError_REMOTE_FILE_NOT_FOUND 78 Remote file not found.
kError_RTSP_CSEQ_ERROR 85 Mismatch of RTSP CSeq numbers.
kError_RTSP_SESSION_ERROR 86 mismatch of RTSP Session Identifiers
kError_SEND_ERROR 55 failed sending network data
kError_SEND_FAIL_REWIND 65 Sending the data requires a rewind that failed
kError_SETOPT_OPTION_SYNTAX 49 Malformed option for CURL via setOpt call.
kError_SSH 79 Error from the SSH layer, somewhat generic so the error message will be of interest when this has happened.
kError_SSL_CACERT 60 problem with the CA cert (path?)

You can often workaround by setting OptionSSLVerifyPeer = 0 and OptionSSLVerifyHost = 0. But that reduces security.
kError_SSL_CACERT_BADFILE 77 Could not load CACERT file, missing or wrong format.
kError_SSL_CERTPROBLEM 58 problem with the local certificate
kError_SSL_CIPHER 59 couldn't use specified cipher
kError_SSL_ClientCert 97 Client-side certificate required.
kError_SSL_CONNECT_ERROR 35 wrong when connecting with SSL
kError_SSL_CRL_BADFILE 82 Could not load CRL file, missing or wrong format (Added in 7.19.0)
kError_SSL_ENGINE_INITFAILED 66 failed to initialise ENGINE
kError_SSL_ENGINE_NOTFOUND 53 SSL crypto engine not found
kError_SSL_ENGINE_SETFAILED 54 can not set SSL crypto engine as default
kError_SSL_INVALIDCERTSTATUS 91 invalid certificate status
kError_SSL_ISSUER_ERROR 83 Issuer check failed. (Added in CURL 7.19.0)
kError_SSL_PINNEDPUBKEYNOTMATCH 90 specified pinned public key did not match.
kError_SSL_SHUTDOWN_FAILED 80 Failed to shut down the SSL connection.
kError_TELNET_OPTION_SYNTAX 49 Malformed option for CURL via setOpt call. Used to be for telnet, but now generic.
kError_TFTP_ILLEGAL 71 Illegal TFTP operation.
kError_TFTP_NOSUCHUSER 74 No such user.
kError_TFTP_NOTFOUND 68 File not found on server.
kError_TFTP_PERM 69 Permission problem on server.
kError_TFTP_UNKNOWNID 72 Unknown transfer ID.
kError_TOO_MANY_REDIRECTS 47 catch endless re-direct loops
kError_UNKNOWN_TELNET_OPTION 48 User specified an unknown option
kError_Unrecoverable_poll 99 poll/select returned fatal error
kError_UNSUPPORTED_PROTOCOL 1
kError_UPLOAD_FAILED 25
kError_URL_MALFORMAT 3
kError_USE_SSL_FAILED 64 Requested FTP SSL level failed
kError_WRITE_ERROR 23

FileNameMatch Event Result Values

Constant Value Description
kFileNameMatchFailed 2 Failed.
kFileNameMatchIsMatch 0 Is Match.
kFileNameMatchNoMatch 1 No match.

Form Constants

Constant Value Description
kFormArray 8
kFormBuffer 11
kFormBufferLength 13
kFormBufferPtr 12
kFormContentHeader 15
kFormContentsLength 6
kFormContentType 14
kFormCopyContents 4
kFormCopyName 1
kFormEnd 17
kFormFile 10
kFormFileContent 7
kFormFilename 16
kFormNameLength 3
kFormPtrContents 5
kFormPtrName 2

FTP Authorization

Constant Value Description
kFTPAUTH_DEFAULT 0 Allow libCURL to decide
kFTPAUTH_SSL 1 Try "AUTH SSL" first, and only if that fails try "AUTH TLS"
kFTPAUTH_TLS 2 Try "AUTH TLS" first, and only if that fails try "AUTH SSL"

FTP CWD method

Constant Value Description
kFTPMethodDefault 0 let libcurl pick
kFTPMethodMultiCWD 1 single CWD operation for each path part
kFTPMethodNoCWD 2 no CWD at all
kFTPMethodSingleCWD 3 one CWD to full dir, then work on file

FTP SSL Option

Constant Value Description
kFTPSSL_ALL 3 Require SSL for all communication or fail with kError_FTP_SSL_FAILED.
kFTPSSL_CONTROL 2 Require SSL for the control connection or fail with kError_FTP_SSL_FAILED.
kFTPSSL_NONE 0 Don't attempt to use SSL.
kFTPSSL_TRY 1 Try using SSL, proceed as normal otherwise.

GSS API delegation modes

Constant Value Description
kGSSAPIDelegationFlag 2 delegate always
kGSSAPIDelegationNone 0 no delegation (default)
kGSSAPIDelegationPolicyFlag 1 if permitted by policy

HTTP Versions

Constant Value Description
kHTTP_VERSION_1_0 1 Enforce HTTP 1.0 requests.
kHTTP_VERSION_1_1 2 Enforce HTTP 1.1 requests.
kHTTP_VERSION_2TLS 4 use version 2 for HTTPS, version 1.1 for HTTP
kHTTP_VERSION_2_0 3 please use HTTP 2 in the request
kHTTP_VERSION_2_PRIOR_KNOWLEDGE 5 please use HTTP 2 without HTTP/1.1 Upgrade
kHTTP_VERSION_3 30 please use HTTP 3 in the request
kHTTP_VERSION_3Only 31 Use HTTP/3 without fallback. For HTTPS only. For HTTP, this makes libcurl return error.
kHTTP_VERSION_NONE 0 We don't care about what version the library uses. libCURL will use whatever it thinks fit.

Debug Message Info Types

Constant Value Description
kINFO_DATA_IN 3 The data is protocol data received from the peer.
kINFO_DATA_OUT 4 The data is protocol data sent to the peer.
kINFO_HEADER_IN 1 The data is header (or header-like) data received from the peer.
kINFO_HEADER_OUT 2 The data is header (or header-like) data sent to the peer.
kINFO_SSL_DATA_IN 5 The data is protocol data received from the peer.
kINFO_SSL_DATA_OUT 6 The data is protocol data sent to the peer.
kINFO_TEXT 0 The data is informational text.

IP Resolve Modes

Constant Value Description
kIPRESOLVE_V4 1 Example
kIPRESOLVE_V6 2 Example
kIPRESOLVE_WHATEVER 0 Example

NetRC Modes

Constant Value Description
kNETRC_IGNORED 0 The .netrc will never be read.
This is the default.
kNETRC_OPTIONAL 1 A user:password in the URL will be preferred to one in the .netrc.
kNETRC_REQUIRED 2 A user:password in the URL will be ignored. Unless one is set programmatically, the .netrc will be queried.

Protocols

Constant Value Description
kProtocolAll -1 Enable all protocols.
kProtocolDICT &h200 DICT
kProtocolFILE &h400 File
kProtocolFTP 4 FTP
kProtocolFTPS 8 FTPS
kProtocolGopher &h2000000 Gopher
kProtocolGophers &h20000000
kProtocolHTTP 1 HTTP
kProtocolHTTPS 2 HTTPS
kProtocolIMAP &h1000 IMAP
kProtocolIMAPS &h2000 IMAPS
kProtocolLDAP &h80 LDAP
kProtocolLDAPS &h100 LDAPS
kProtocolMQTT &h10000000 MQTT
kProtocolPOP3 &h4000 POP3
kProtocolPOP3S &h8000 POP3S
kProtocolRTMP &h80000 RTMP
kProtocolRTMPE &h200000 RTMPE
kProtocolRTMPS &h800000 RTMPS
kProtocolRTMPT &h100000 RTMPT
kProtocolRTMPTE &h400000 RTMPTE
kProtocolRTMPTS &h1000000 RTMPTS
kProtocolRTSP &h40000 RTSP
kProtocolSCP &h10 SCP
kProtocolSFTP &h20 SFTP
kProtocolSMB &h4000000 SMB
kProtocolSMBS &h8000000 SMBS
kProtocolSMTP &h10000 SMTP
kProtocolSMTPS &h20000 SMTPS
kProtocolTelnet &h40 Telnet
kProtocolTFTP &h800 TFTP

Proxy Types

Constant Value Description
kPROXY_HTTP 0
kPROXY_HTTP10 1 Force to use CONNECT HTTP/1.0.
kPROXY_HTTP11 0 Connect using HTTP/1.1.
kPROXY_SOCKS4 4
kPROXY_SOCKS4A 6 Using SOCKS 4A.
kPROXY_SOCKS5 5
kPROXY_SOCKS5_Hostname 7 Use the SOCKS5 protocol but pass along the host name rather than the IP address. added in 7.18.0

Seek Origin Constants

Constant Value Description
kSeekOriginCurrent 1 Seek relative to current file position.
kSeekOriginEnd 2 Seek relative to end of file.
kSeekOriginSet 0 Seek relative to start of file.

Seek Event Result Values

Constant Value Description
kSeekReturnCantSeek 3 Return this value if you can't seek as you are not using a file, but for example a stream.
kSeekReturnFail 2 Returns this value if your seek operation failed.
kSeekReturnOk 1 Returns this value if your seek operation succeeded.

SSH Authentication

Constant Value Description
kSSHAuthAgent 16 agent (ssh-agent, pageant...)
kSSHAuthAny -1 Any allowed
kSSHAuthDefault -1 Default: Any
kSSHAuthGSSAPI 32 gssapi (kerberos, ...)
kSSHAuthHost 4 host key files
kSSHAuthKeyboard 8 keyboard interactive
kSSHAuthNone 0 none allowed, silly but complete
kSSHAuthPassword 2 password
kSSHAuthPublicKey 1 public/private key files

SSL Option Flags

Constant Value Description
kSSLOptionAllowBeast 1 tells libcurl to allow the BEAST SSL vulnerability in the name of improving interoperability with older servers. Some SSL libraries have introduced work-arounds for this flaw but those work-arounds sometimes make the SSL communication fail. To regain functionality with those broken servers, a user can this way allow the vulnerability back.
kSSLOptionAutoClientCert 32 Tells libcurl to automatically locate and use a client certificate for authentication. (Schannel)
kSSLOptionNativeCA 16 tells libcurl to use standard certificate store of operating system. Currently implemented under MS-Windows.
kSSLOptionNoPartialChain 4 tells libcurl to *NOT* accept a partial certificate chain if possible. The OpenSSL backend has this ability.
kSSLOptionNoRevoke 2 tells libcurl to disable certificate revocation checks for those SSL backends where such behavior is present.
kSSLOptionRevokeBestEffort 8 tells libcurl to ignore certificate revocation offline checks and ignore missing revocation list for those SSL backends where such behavior is present.

SSL Versions

Constant Value Description
kSSLVersionDefault 0 The default acceptable version range. The minimum acceptable version is by default TLS v1.0 since 7.39.0 (unless the TLS library has a stricter rule).
kSSLVersionSSLv2 2 SSL v2 (but not SSLv3)
kSSLVersionSSLv3 3 SSL v3 (but not SSLv2)
kSSLVersionTLSv1 1 TLS v1.0 or later
kSSLVersionTLSv10 4 TLS v1.0 or later (Added in 7.34.0)
kSSLVersionTLSv11 5 TLS v1.1 or later (Added in 7.34.0)
kSSLVersionTLSv12 6 TLS v1.2 or later (Added in 7.34.0)
kSSLVersionTLSv13 7 TLS v1.3 or later (Added in 7.52.0)

Time Conditions

Constant Value Description
kTimeConditionIfModifiedSince 1
kTimeConditionIfUnModifiedSince 2
kTimeConditionNone 0 No condition.

SSL Option

Constant Value Description
kUseSSLall 3 Require SSL for all communication or fail with kError_FTP_SSL_FAILED.
kUseSSLcontrol 2 Require SSL for the control connection or fail with kError_FTP_SSL_FAILED.
kUseSSLnone 0 Don't attempt to use SSL.
kUseSSLtry 1 Try using SSL, proceed as normal otherwise.

💬 Ask a question or report a problem