Generic network client based on libcurl.
-
macOS library version:
libcurl-8.9.1
openssl-3.3.1
libz-1.2.11
libssh2-1.11.0
brotli-1.0.9
nghttp2-1.61.0
zstd-1.5.6
-
Windows library version:
libcurl-8.9.1
openssl-3.3.1 (Schannel)
libz-1.3.1
libssh2-1.11.0
brotli-1.1.0
nghttp2-1.62.1
zstd-1.5.5
vcpkg configuration: [brotli,c-ares,core,http2,idn2,non-http,openssl,schannel,ssh,ssl,sspi,winldap,zstd] --triplet x64-windows-static
-
missing protocol on Windows: rtmp, rtmpe, rtmps, rtmpt, rtmpte, rtmpts
-
callback frequency increased: from every
1
second to every100
milliseconds max -
removed Windows 32-bit support
-
JSON parameters are now native objects:
Text:=cURL_VersionInfo()
Object:=cURL_VersionInfo()
Long:=cURL(Text;Blob;Blob;Text;Text;Text)
Object:=cURL(Object;Blob;Blob;Text)
curl_callback_method(Text;Text) => Bool
curl_callback_method(Object;Text) => Bool
- integrated high-level FTP commands in
4.0.0
new syntax for cURL_FTP_Receive
and cURL_FTP_Send
Parameter | Type | Description |
---|---|---|
options | OBJECT | |
data | BLOB | |
callbackMethod | TEXT | optional |
status | OBJECT |
use CURLOPT_READDATA
CURLOPT_WRITEDATA
to specify a path in/out (same as cURL)
otherwise pass a BLOB in $2
new syntax for all other commands
Parameter | Type | Description |
---|---|---|
options | OBJECT | |
callbackMethod | TEXT | optional |
status | OBJECT |
use FTP_CREATE_MISSING_DIRS
option with cURL_FTP_Send
and cURL_FTP_MakeDir
use WILDCARDMATCH
option with cURL_FTP_Receive
Properties of curlInfo
conditionUnmet
contentLengthUpload
rtspClientCseq
rtspServerCseq
rtspCseqRecv
lastSocket
primaryPort
localPort
contentLengthDownload
connectCode
fileTime
totalTime
requestSize
headerSize
speedUpload
speedDownload
sizeDownload
sizeUpload
httpAuthAvail
proxyAuthAvail
osErrNo
numConnects
responseCode
nameLookupTime
connectTime
appConnectTime
preTransferTime
startTransferTime
redirectTime
sslVerifyResult
redirectCount
effectiveUrl
localIp
contentType
primaryIp
redirectUrl
ftpEntryPath
rtspSessionId
Special options
Value | Type | Description |
---|---|---|
PRIVATE | TEXT | context info passed to callbackMethod |
READDATA | TEXT | use file path instead of request |
WRITEDATA | TEXT | use file path instead of response |
AUTOPROXY | LONGINT | 1 to use libproxy |
ATOMIC | BOOLEAN | True to use simple (as opposed to multiple) API |
DEBUG | TEXT | folder path to create log files |
FTP_USE_MLSD | BOOLEAN | True to use MLSD instead of LIST |
Standard options
Standard options
with constant support
Value | Type | Description |
---|---|---|
USE_SSL | TEXT | USESSL_NONE, USESSL_TRY, USESSL_CONTROL, USESSL_ALL |
SSLVERSION | TEXT | SSLVERSION_TLSv1, SSLVERSION_SSLv2, SSLVERSION_SSLv3, SSLVERSION_TLSv1_0, SSLVERSION_TLSv1_1, SSLVERSION_TLSv1_2, SSLVERSION_TLSv1_3 |
HTTP_VERSION | TEXT | HTTP_VERSION_1_0, HTTP_VERSION_1_1, HTTP_VERSION_2_0, HTTP_VERSION_2TLS, HTTP_VERSION_2_PRIOR_KNOWLEDGE |
PROXY_SSLVERSION | TEXT | SSLVERSION_TLSv1, SSLVERSION_SSLv2, SSLVERSION_SSLv3, SSLVERSION_TLSv1_0, SSLVERSION_TLSv1_1, SSLVERSION_TLSv1_2, SSLVERSION_TLSv1_3 |
TIMECONDITION | TEXT | TIMECOND_IFMODSINCE, TIMECOND_IFUNMODSINCE, TIMECOND_LASTMOD |
PROXYTYPE | TEXT | PROXY_HTTPS, PROXY_SOCKS4, PROXY_SOCKS4A, PROXY_SOCKS5 |
FTPSSLAUTH | TEXT | FTPAUTH_SSL, FTPAUTH_TLS |
HEADEROPT | TEXT | HEADER_UNIFIED, HEADER_SEPARATE |
Standard options
with collection support
Value | Type | Description |
---|---|---|
CONNECT_TO | COLLECTION | text array |
PROXYHEADER | COLLECTION | text array |
HTTPHEADER | COLLECTION | text array |
HTTP200ALIASES | COLLECTION | text array |
RESOLVE | COLLECTION | text array |
MAIL_RCPT | COLLECTION | text array |
MAIL_FROM | TEXT | |
PREQUOTE | COLLECTION | text array |
POSTQUOTE | COLLECTION | text array |
QUOTE | COLLECTION | text array |
TELNETOPTIONS | COLLECTION | text array |
Not supported
POSTFIELDSIZE_LARGE
(automatic)
INFILESIZE_LARGE
(automatic)
POSTFIELDS
VERBOSE
NOPROGRESS
READFUNCTION
WRITEFUNCTION
ERRORBUFFER
READDATA
WRITEDATA
OBSOLETE72
PROGRESSDATA
PROGRESSFUNCTION
TRANSFERTEXT
OBSOLETE40
STDERR
HEADERDATA
HTTPPOST
IOCTLDATA
IOCTLFUNCTION
TCP_NODELAY
SSL_CTX_DATA
SSL_CTX_FUNCTION
SHARE
NOSIGNAL
DEBUGDATA
DEBUGFUNCTION
DNS_USE_GLOBAL_CACHE
SSLENGINE_DEFAULT
SSLENGINE
HEADERFUNCTION
SEEKDATA
SEEKFUNCTION
COPYPOSTFIELDS
OPENSOCKETDATA
OPENSOCKETFUNCTION
SOCKOPTDATA
SOCKOPTFUNCTION
CONV_FROM_UTF8_FUNCTION
CONV_TO_NETWORK_FUNCTION
CONV_FROM_NETWORK_FUNCTION
GSSAPI_DELEGATION
SOCKS5_GSSAPI_NEC
SOCKS5_GSSAPI_SERVICE
CLOSESOCKETDATA
CLOSESOCKETFUNCTION
FNMATCH_DATA
CHUNK_DATA
FNMATCH_FUNCTION
CHUNK_END_FUNCTION
CHUNK_BGN_FUNCTION
INTERLEAVEFUNCTION
INTERLEAVEDATA
SSH_KEYDATA
SSH_KEYFUNCTION
STREAM_DEPENDS_E
STREAM_DEPENDS
UNIX_SOCKET_PATH
XFERINFOFUNCTION
SSL_OPTIONS
ABSTRACT_UNIX_SOCKET
MIMEPOST
RESOLVER_START_FUNCTION
RESOLVER_START_DATA
- SMTP
You might want to enable FORBID_REUSE
if your plan is to use different credentials in a batch process. By default, cURL re-uses the TCP connection, which may not be what you want.
You can pass a collection or string to MAIL_TO
. But you can only pass string to MAIL_FROM
.
You must pass a simple email adress to MAIL_FROM
. You can NOT pass the email address with a display name, as you would do for the SMTP header. (It is your responsibility to include a well-formatted From
header in the SMTP request.
- Any
By default, cURL has a very tolerant timeout setting. In production, you might want to explicitly set all the timeout options.