module Curl:sig
..end
libcurl wrapper
type
t
type
curlCode =
| |
CURLE_OK |
| |
CURLE_UNSUPPORTED_PROTOCOL |
| |
CURLE_FAILED_INIT |
| |
CURLE_URL_MALFORMAT |
| |
CURLE_URL_MALFORMAT_USER |
| |
CURLE_COULDNT_RESOLVE_PROXY |
| |
CURLE_COULDNT_RESOLVE_HOST |
| |
CURLE_COULDNT_CONNECT |
| |
CURLE_FTP_WEIRD_SERVER_REPLY |
| |
CURLE_FTP_ACCESS_DENIED |
| |
CURLE_FTP_USER_PASSWORD_INCORRECT |
| |
CURLE_FTP_WEIRD_PASS_REPLY |
| |
CURLE_FTP_WEIRD_USER_REPLY |
| |
CURLE_FTP_WEIRD_PASV_REPLY |
| |
CURLE_FTP_WEIRD_227_FORMAT |
| |
CURLE_FTP_CANT_GET_HOST |
| |
CURLE_FTP_CANT_RECONNECT |
| |
CURLE_FTP_COULDNT_SET_BINARY |
| |
CURLE_PARTIAL_FILE |
| |
CURLE_FTP_COULDNT_RETR_FILE |
| |
CURLE_FTP_WRITE_ERROR |
| |
CURLE_FTP_QUOTE_ERROR |
| |
CURLE_HTTP_NOT_FOUND |
| |
CURLE_WRITE_ERROR |
| |
CURLE_MALFORMAT_USER |
| |
CURLE_FTP_COULDNT_STOR_FILE |
| |
CURLE_READ_ERROR |
| |
CURLE_OUT_OF_MEMORY |
| |
CURLE_OPERATION_TIMEOUTED |
| |
CURLE_FTP_COULDNT_SET_ASCII |
| |
CURLE_FTP_PORT_FAILED |
| |
CURLE_FTP_COULDNT_USE_REST |
| |
CURLE_FTP_COULDNT_GET_SIZE |
| |
CURLE_HTTP_RANGE_ERROR |
| |
CURLE_HTTP_POST_ERROR |
| |
CURLE_SSL_CONNECT_ERROR |
| |
CURLE_FTP_BAD_DOWNLOAD_RESUME |
| |
CURLE_FILE_COULDNT_READ_FILE |
| |
CURLE_LDAP_CANNOT_BIND |
| |
CURLE_LDAP_SEARCH_FAILED |
| |
CURLE_LIBRARY_NOT_FOUND |
| |
CURLE_FUNCTION_NOT_FOUND |
| |
CURLE_ABORTED_BY_CALLBACK |
| |
CURLE_BAD_FUNCTION_ARGUMENT |
| |
CURLE_BAD_CALLING_ORDER |
| |
CURLE_HTTP_PORT_FAILED |
| |
CURLE_BAD_PASSWORD_ENTERED |
| |
CURLE_TOO_MANY_REDIRECTS |
| |
CURLE_UNKNOWN_TELNET_OPTION |
| |
CURLE_TELNET_OPTION_SYNTAX |
| |
CURLE_OBSOLETE |
| |
CURLE_SSL_PEER_CERTIFICATE |
| |
CURLE_GOT_NOTHING |
| |
CURLE_SSL_ENGINE_NOTFOUND |
| |
CURLE_SSL_ENGINE_SETFAILED |
| |
CURLE_SEND_ERROR |
| |
CURLE_RECV_ERROR |
| |
CURLE_SHARE_IN_USE |
| |
CURLE_SSL_CERTPROBLEM |
| |
CURLE_SSL_CIPHER |
| |
CURLE_SSL_CACERT |
| |
CURLE_BAD_CONTENT_ENCODING |
| |
CURLE_LDAP_INVALID_URL |
| |
CURLE_FILESIZE_EXCEEDED |
| |
CURLE_USE_SSL_FAILED |
| |
CURLE_SEND_FAIL_REWIND |
| |
CURLE_SSL_ENGINE_INITFAILED |
| |
CURLE_LOGIN_DENIED |
| |
CURLE_TFTP_NOTFOUND |
| |
CURLE_TFTP_PERM |
| |
CURLE_REMOTE_DISK_FULL |
| |
CURLE_TFTP_ILLEGAL |
| |
CURLE_TFTP_UNKNOWNID |
| |
CURLE_REMOTE_FILE_EXISTS |
| |
CURLE_TFTP_NOSUCHUSER |
| |
CURLE_CONV_FAILED |
| |
CURLE_CONV_REQD |
| |
CURLE_SSL_CACERT_BADFILE |
| |
CURLE_REMOTE_FILE_NOT_FOUND |
| |
CURLE_SSH |
| |
CURLE_SSL_SHUTDOWN_FAILED |
| |
CURLE_AGAIN |
exception CurlException of (curlCode * int * string)
exception NotImplemented of string
exception raised when trying to use options missing from libcurl headers, argument is the option name
type
curlNETRCOption =
| |
CURL_NETRC_OPTIONAL |
| |
CURL_NETRC_IGNORED |
| |
CURL_NETRC_REQUIRED |
type
curlEncoding =
| |
CURL_ENCODING_NONE |
| |
CURL_ENCODING_DEFLATE |
| |
CURL_ENCODING_GZIP |
| |
CURL_ENCODING_ANY |
type
curlContentType =
| |
DEFAULT |
| |
CONTENTTYPE of |
type
curlHTTPPost =
| |
CURLFORM_CONTENT of |
| |
CURLFORM_FILECONTENT of |
| |
CURLFORM_FILE of |
| |
CURLFORM_BUFFER of |
type
curlSSLVersion =
| |
SSLVERSION_DEFAULT |
(* | attempt to figure out the remote SSL protocol version | *) |
| |
SSLVERSION_TLSv1 |
(* | TLSv1.x | *) |
| |
SSLVERSION_SSLv2 |
(* | SSLv2 | *) |
| |
SSLVERSION_SSLv3 |
(* | SSLv3 | *) |
| |
SSLVERSION_TLSv1_0 |
(* | Added in libcurl 7.34.0, will request TLSv1.x in previous versions | *) |
| |
SSLVERSION_TLSv1_1 |
(* | Added in libcurl 7.34.0, will request TLSv1.x in previous versions | *) |
| |
SSLVERSION_TLSv1_2 |
(* | Added in libcurl 7.34.0, will request TLSv1.x in previous versions | *) |
| |
SSLVERSION_TLSv1_3 |
(* | Added in libcurl 7.52.0, will request TLSv1.x in previous versions | *) |
type
curlTimeCondition =
| |
TIMECOND_NONE |
(* | since 0.6.1 | *) |
| |
TIMECOND_IFMODSINCE |
|||
| |
TIMECOND_IFUNMODSINCE |
|||
| |
TIMECOND_LASTMOD |
(* | since 0.6.1 | *) |
type
curlKRB4Level =
| |
KRB4_NONE |
| |
KRB4_CLEAR |
| |
KRB4_SAFE |
| |
KRB4_CONFIDENTIAL |
| |
KRB4_PRIVATE |
type
curlClosePolicy =
| |
CLOSEPOLICY_OLDEST |
| |
CLOSEPOLICY_LEAST_RECENTLY_USED |
type
curlSSLVerifyHost =
| |
SSLVERIFYHOST_NONE |
(* | connection succeeds regardless of the names in the certificate | *) |
| |
SSLVERIFYHOST_EXISTENCE |
(* | deprecated, equivalent to SSLVERIFYHOST_HOSTNAME | *) |
| |
SSLVERIFYHOST_HOSTNAME |
(* | certificate must indicate the matching hostname, or the connection fails | *) |
type
curlHTTPVersion =
| |
HTTP_VERSION_NONE |
(* | libcurl will make the best choice | *) |
| |
HTTP_VERSION_1_0 |
(* | please use HTTP 1.0 | *) |
| |
HTTP_VERSION_1_1 |
(* | please use HTTP 1.1 | *) |
| |
HTTP_VERSION_2 |
(* | please use HTTP 2 (requires libcurl >= 7.33.0, otherwise will fallback to libcurl choice) | *) |
| |
HTTP_VERSION_2TLS |
(* | use version 2 for HTTPS, version 1.1 for HTTP (requires libcurl >= 7.47.0) | *) |
| |
HTTP_VERSION_2_PRIOR_KNOWLEDGE |
(* | Issue non-TLS HTTP requests using HTTP/2 without HTTP/1 (requires libcurl >= 7.49.0) | *) |
| |
HTTP_VERSION_3 |
(* | Makes use of explicit HTTP/3 without fallback. Use CURLOPT_ALTSVC to enable HTTP/3 upgrade (requires libcurl >= 7.66.0) | *) |
type
curlDebugType =
| |
DEBUGTYPE_TEXT |
| |
DEBUGTYPE_HEADER_IN |
| |
DEBUGTYPE_HEADER_OUT |
| |
DEBUGTYPE_DATA_IN |
| |
DEBUGTYPE_DATA_OUT |
| |
DEBUGTYPE_SSL_DATA_IN |
| |
DEBUGTYPE_SSL_DATA_OUT |
| |
DEBUGTYPE_END |
type
curlAuth =
| |
CURLAUTH_BASIC |
| |
CURLAUTH_DIGEST |
| |
CURLAUTH_GSSNEGOTIATE |
| |
CURLAUTH_NTLM |
| |
CURLAUTH_ANY |
| |
CURLAUTH_ANYSAFE |
type
curlIPResolve =
| |
IPRESOLVE_WHATEVER |
| |
IPRESOLVE_V4 |
| |
IPRESOLVE_V6 |
type
curlFTPSSL =
| |
FTPSSL_NONE |
| |
FTPSSL_TRY |
| |
FTPSSL_CONTROL |
| |
FTPSSL_ALL |
type
curlFTPSSLAuth =
| |
FTPAUTH_DEFAULT |
| |
FTPAUTH_SSL |
| |
FTPAUTH_TLS |
type
curlIOCmd =
| |
IOCMD_NOP |
| |
IOCMD_RESTARTREAD |
type
curlIOErr =
| |
IOE_OK |
| |
IOE_UNKNOWNCMD |
| |
IOE_FAILRESTART |
type
curlSeekResult =
| |
SEEKFUNC_OK |
| |
SEEKFUNC_FAIL |
| |
SEEKFUNC_CANTSEEK |
type
curlFTPMethod =
| |
FTPMETHOD_DEFAULT |
| |
FTPMETHOD_MULTICWD |
| |
FTPMETHOD_NOCWD |
| |
FTPMETHOD_SINGLECWD |
type
curlSSHAuthTypes =
| |
SSHAUTH_ANY |
| |
SSHAUTH_PUBLICKEY |
| |
SSHAUTH_PASSWORD |
| |
SSHAUTH_HOST |
| |
SSHAUTH_KEYBOARD |
type
curlFTPSSLCCC =
| |
FTPSSL_CCC_NONE |
| |
FTPSSL_CCC_PASSIVE |
| |
FTPSSL_CCC_ACTIVE |
type
curlSeek =
| |
SEEK_SET |
| |
SEEK_CUR |
| |
SEEK_END |
type
curlProxyType =
| |
CURLPROXY_HTTP |
|||
| |
CURLPROXY_HTTP_1_0 |
(* | since libcurl 7.19.4 | *) |
| |
CURLPROXY_SOCKS4 |
(* | since libcurl 7.15.2 | *) |
| |
CURLPROXY_SOCKS5 |
|||
| |
CURLPROXY_SOCKS4A |
(* | since libcurl 7.18.0 | *) |
| |
CURLPROXY_SOCKS5_HOSTNAME |
(* | since libcurl 7.18.0 | *) |
type
data_source =
| |
String of |
(* | Equivalent to `CURLMIME_DATA` | *) |
| |
File of |
(* | Equivalent to `CURLMIME_FILEDATA` | *) |
type
curlMIMEPartData =
| |
CURLMIME_DATA of |
||||||
| |
CURLMIME_FILEDATA of |
||||||
| |
CURLMIME_DATA_WITH_NAME of |
type
curlMIMEEncoding =
| |
CURLMIME_8BIT |
| |
CURLMIME_BINARY |
| |
CURLMIME_7BIT |
| |
CURLMIME_QUOTEDPRINTABLE |
| |
CURLMIME_BASE64 |
| |
CURLMIME_NONE |
type
curlMIMEPart = {
|
encoding : |
|
headers : |
|
subparts : |
|
data : |
}
type
curlKHMatch =
| |
CURLKHMATCH_OK |
|||
| |
CURLKHMATCH_MISMATCH of |
(* | Argument consists of the base64-encoded public key of the remote host as as found in the "known hosts" file * | *) |
| |
CURLKHMATCH_MISSING |
type
curlKHStat =
| |
CURLKHSTAT_FINE_ADD_TO_FILE |
| |
CURLKHSTAT_FINE |
| |
CURLKHSTAT_REJECT |
| |
CURLKHSTAT_DEFER |
type
curlProto =
| |
CURLPROTO_ALL |
(* | enable everything | *) |
| |
CURLPROTO_HTTP |
|||
| |
CURLPROTO_HTTPS |
|||
| |
CURLPROTO_FTP |
|||
| |
CURLPROTO_FTPS |
|||
| |
CURLPROTO_SCP |
|||
| |
CURLPROTO_SFTP |
|||
| |
CURLPROTO_TELNET |
|||
| |
CURLPROTO_LDAP |
|||
| |
CURLPROTO_LDAPS |
|||
| |
CURLPROTO_DICT |
|||
| |
CURLPROTO_FILE |
|||
| |
CURLPROTO_TFTP |
|||
| |
CURLPROTO_IMAP |
|||
| |
CURLPROTO_IMAPS |
|||
| |
CURLPROTO_POP3 |
|||
| |
CURLPROTO_POP3S |
|||
| |
CURLPROTO_SMTP |
|||
| |
CURLPROTO_SMTPS |
|||
| |
CURLPROTO_RTSP |
|||
| |
CURLPROTO_RTMP |
|||
| |
CURLPROTO_RTMPT |
|||
| |
CURLPROTO_RTMPE |
|||
| |
CURLPROTO_RTMPTE |
|||
| |
CURLPROTO_RTMPS |
|||
| |
CURLPROTO_RTMPTS |
|||
| |
CURLPROTO_GOPHER |
Protocols to enable (via CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS)
type
curlPostRedir =
| |
REDIR_POST_ALL |
|||
| |
REDIR_POST_301 |
|||
| |
REDIR_POST_302 |
|||
| |
REDIR_POST_303 |
(* | added in libcurl 7.26.0 | *) |
if flag is not supported by libcurl - enabling it does nothing
type
curlSslOption =
| |
CURLSSLOPT_ALLOW_BEAST |
| |
CURLSSLOPT_NO_REVOKE |
| |
CURLSSLOPT_NO_PARTIALCHAIN |
| |
CURLSSLOPT_REVOKE_BEST_EFFORT |
| |
CURLSSLOPT_NATIVE_CA |
| |
CURLSSLOPT_AUTO_CLIENT_CERT |
type 'a
xfer_result =
| |
Proceed of |
| |
Pause |
| |
Abort |
typewrite_result =
unit xfer_result
typeread_result =
string xfer_result
val proceed : write_result
type
curlOption =
| |
CURLOPT_WRITEFUNCTION of |
|||
| |
CURLOPT_READFUNCTION of |
|||
| |
CURLOPT_INFILESIZE of |
|||
| |
CURLOPT_URL of |
|||
| |
CURLOPT_PROXY of |
|||
| |
CURLOPT_PROXYPORT of |
|||
| |
CURLOPT_HTTPPROXYTUNNEL of |
|||
| |
CURLOPT_VERBOSE of |
|||
| |
CURLOPT_HEADER of |
|||
| |
CURLOPT_NOPROGRESS of |
|||
| |
CURLOPT_NOSIGNAL of |
|||
| |
CURLOPT_NOBODY of |
|||
| |
CURLOPT_FAILONERROR of |
|||
| |
CURLOPT_UPLOAD of |
|||
| |
CURLOPT_POST of |
|||
| |
CURLOPT_FTPLISTONLY of |
|||
| |
CURLOPT_FTPAPPEND of |
|||
| |
CURLOPT_NETRC of |
|||
| |
CURLOPT_ENCODING of |
|||
| |
CURLOPT_FOLLOWLOCATION of |
|||
| |
CURLOPT_TRANSFERTEXT of |
|||
| |
CURLOPT_PUT of |
|||
| |
CURLOPT_USERPWD of |
|||
| |
CURLOPT_PROXYUSERPWD of |
|||
| |
CURLOPT_RANGE of |
|||
| |
CURLOPT_ERRORBUFFER of |
|||
| |
CURLOPT_TIMEOUT of |
|||
| |
CURLOPT_POSTFIELDS of |
|||
| |
CURLOPT_POSTFIELDSIZE of |
|||
| |
CURLOPT_REFERER of |
|||
| |
CURLOPT_USERAGENT of |
|||
| |
CURLOPT_FTPPORT of |
|||
| |
CURLOPT_LOWSPEEDLIMIT of |
|||
| |
CURLOPT_LOWSPEEDTIME of |
|||
| |
CURLOPT_RESUMEFROM of |
|||
| |
CURLOPT_COOKIE of |
|||
| |
CURLOPT_HTTPHEADER of |
|||
| |
CURLOPT_HTTPPOST of |
|||
| |
CURLOPT_SSLCERT of |
|||
| |
CURLOPT_SSLCERTTYPE of |
|||
| |
CURLOPT_SSLCERTPASSWD of |
|||
| |
CURLOPT_SSLKEY of |
|||
| |
CURLOPT_SSLKEYTYPE of |
|||
| |
CURLOPT_SSLKEYPASSWD of |
|||
| |
CURLOPT_SSLENGINE of |
|||
| |
CURLOPT_SSLENGINEDEFAULT of |
|||
| |
CURLOPT_CRLF of |
|||
| |
CURLOPT_QUOTE of |
|||
| |
CURLOPT_POSTQUOTE of |
|||
| |
CURLOPT_HEADERFUNCTION of |
|||
| |
CURLOPT_COOKIEFILE of |
|||
| |
CURLOPT_SSLVERSION of |
|||
| |
CURLOPT_TIMECONDITION of |
|||
| |
CURLOPT_TIMEVALUE of |
|||
| |
CURLOPT_CUSTOMREQUEST of |
|||
| |
CURLOPT_INTERFACE of |
|||
| |
CURLOPT_KRB4LEVEL of |
|||
| |
CURLOPT_PROGRESSFUNCTION of |
|||
| |
CURLOPT_SSLVERIFYPEER of |
|||
| |
CURLOPT_CAINFO of |
|||
| |
CURLOPT_CAPATH of |
|||
| |
CURLOPT_FILETIME of |
|||
| |
CURLOPT_MAXREDIRS of |
|||
| |
CURLOPT_MAXCONNECTS of |
|||
| |
CURLOPT_CLOSEPOLICY of |
|||
| |
CURLOPT_FRESHCONNECT of |
|||
| |
CURLOPT_FORBIDREUSE of |
|||
| |
CURLOPT_RANDOMFILE of |
|||
| |
CURLOPT_EGDSOCKET of |
|||
| |
CURLOPT_CONNECTTIMEOUT of |
|||
| |
CURLOPT_HTTPGET of |
|||
| |
CURLOPT_SSLVERIFYHOST of |
|||
| |
CURLOPT_COOKIEJAR of |
|||
| |
CURLOPT_SSLCIPHERLIST of |
|||
| |
CURLOPT_HTTPVERSION of |
|||
| |
CURLOPT_FTPUSEEPSV of |
|||
| |
CURLOPT_DNSCACHETIMEOUT of |
|||
| |
CURLOPT_DNSUSEGLOBALCACHE of |
|||
| |
CURLOPT_DEBUGFUNCTION of |
|||
| |
CURLOPT_PRIVATE of |
(* | doesn't employ libcurl's CURLOPT_PRIVATE | *) |
| |
CURLOPT_HTTP200ALIASES of |
|||
| |
CURLOPT_UNRESTRICTEDAUTH of |
|||
| |
CURLOPT_FTPUSEEPRT of |
|||
| |
CURLOPT_HTTPAUTH of |
|||
| |
CURLOPT_FTPCREATEMISSINGDIRS of |
|||
| |
CURLOPT_PROXYAUTH of |
|||
| |
CURLOPT_FTPRESPONSETIMEOUT of |
|||
| |
CURLOPT_IPRESOLVE of |
|||
| |
CURLOPT_MAXFILESIZE of |
|||
| |
CURLOPT_INFILESIZELARGE of |
|||
| |
CURLOPT_RESUMEFROMLARGE of |
|||
| |
CURLOPT_MAXFILESIZELARGE of |
|||
| |
CURLOPT_NETRCFILE of |
|||
| |
CURLOPT_FTPSSL of |
|||
| |
CURLOPT_POSTFIELDSIZELARGE of |
|||
| |
CURLOPT_TCPNODELAY of |
|||
| |
CURLOPT_TCP_FASTOPEN of |
|||
| |
CURLOPT_FTPSSLAUTH of |
|||
| |
CURLOPT_IOCTLFUNCTION of |
|||
| |
CURLOPT_FTPACCOUNT of |
|||
| |
CURLOPT_COOKIELIST of |
|||
| |
CURLOPT_IGNORECONTENTLENGTH of |
|||
| |
CURLOPT_FTPSKIPPASVIP of |
|||
| |
CURLOPT_FTPFILEMETHOD of |
|||
| |
CURLOPT_LOCALPORT of |
|||
| |
CURLOPT_LOCALPORTRANGE of |
|||
| |
CURLOPT_CONNECTONLY of |
|||
| |
CURLOPT_MAXSENDSPEEDLARGE of |
|||
| |
CURLOPT_MAXRECVSPEEDLARGE of |
|||
| |
CURLOPT_FTPALTERNATIVETOUSER of |
|||
| |
CURLOPT_SSLSESSIONIDCACHE of |
|||
| |
CURLOPT_SSHAUTHTYPES of |
|||
| |
CURLOPT_SSHPUBLICKEYFILE of |
|||
| |
CURLOPT_SSHPRIVATEKEYFILE of |
|||
| |
CURLOPT_FTPSSLCCC of |
|||
| |
CURLOPT_TIMEOUTMS of |
|||
| |
CURLOPT_CONNECTTIMEOUTMS of |
|||
| |
CURLOPT_HTTPTRANSFERDECODING of |
|||
| |
CURLOPT_HTTPCONTENTDECODING of |
|||
| |
CURLOPT_NEWFILEPERMS of |
|||
| |
CURLOPT_NEWDIRECTORYPERMS of |
|||
| |
CURLOPT_POST301 of |
|||
| |
CURLOPT_SSHHOSTPUBLICKEYMD5 of |
|||
| |
CURLOPT_COPYPOSTFIELDS of |
|||
| |
CURLOPT_PROXYTRANSFERMODE of |
|||
| |
CURLOPT_SEEKFUNCTION of |
|||
| |
CURLOPT_AUTOREFERER of |
|||
| |
CURLOPT_OPENSOCKETFUNCTION of |
|||
| |
CURLOPT_PROXYTYPE of |
|||
| |
CURLOPT_PROTOCOLS of |
|||
| |
CURLOPT_REDIR_PROTOCOLS of |
|||
| |
CURLOPT_RESOLVE of |
|||
| |
CURLOPT_DNS_SERVERS of |
|||
| |
CURLOPT_MAIL_FROM of |
|||
| |
CURLOPT_MAIL_RCPT of |
|||
| |
CURLOPT_PIPEWAIT of |
|||
| |
CURLOPT_CERTINFO of |
|||
| |
CURLOPT_USERNAME of |
|||
| |
CURLOPT_PASSWORD of |
|||
| |
CURLOPT_LOGIN_OPTIONS of |
|||
| |
CURLOPT_CONNECT_TO of |
|||
| |
CURLOPT_POSTREDIR of |
|||
| |
CURLOPT_MIMEPOST of |
|||
| |
CURLOPT_SSHKNOWNHOSTS of |
|||
| |
CURLOPT_SSHKEYFUNCTION of |
(* | The second argument to the passed function consists of the raw bytes of the public key sent by the remote host. If the function raises an exception the key will be rejected, and the connection will fail.* | *) |
| |
CURLOPT_BUFFERSIZE of |
|||
| |
CURLOPT_DOH_URL of |
|||
| |
CURLOPT_SSL_OPTIONS of |
|||
| |
CURLOPT_WRITEFUNCTION2 of |
|||
| |
CURLOPT_READFUNCTION2 of |
|||
| |
CURLOPT_XFERINFOFUNCTION of |
type
initOption =
| |
CURLINIT_GLOBALALL |
| |
CURLINIT_GLOBALSSL |
| |
CURLINIT_GLOBALWIN32 |
| |
CURLINIT_GLOBALNOTHING |
type
curlInfo =
| |
CURLINFO_EFFECTIVE_URL |
|||
| |
CURLINFO_HTTP_CODE |
|||
| |
CURLINFO_RESPONSE_CODE |
|||
| |
CURLINFO_TOTAL_TIME |
|||
| |
CURLINFO_NAMELOOKUP_TIME |
|||
| |
CURLINFO_CONNECT_TIME |
|||
| |
CURLINFO_PRETRANSFER_TIME |
|||
| |
CURLINFO_SIZE_UPLOAD |
|||
| |
CURLINFO_SIZE_DOWNLOAD |
|||
| |
CURLINFO_SPEED_DOWNLOAD |
|||
| |
CURLINFO_SPEED_UPLOAD |
|||
| |
CURLINFO_HEADER_SIZE |
|||
| |
CURLINFO_REQUEST_SIZE |
|||
| |
CURLINFO_SSL_VERIFYRESULT |
|||
| |
CURLINFO_FILETIME |
|||
| |
CURLINFO_CONTENT_LENGTH_DOWNLOAD |
|||
| |
CURLINFO_CONTENT_LENGTH_UPLOAD |
|||
| |
CURLINFO_STARTTRANSFER_TIME |
|||
| |
CURLINFO_CONTENT_TYPE |
|||
| |
CURLINFO_REDIRECT_TIME |
|||
| |
CURLINFO_REDIRECT_COUNT |
|||
| |
CURLINFO_PRIVATE |
(* | returns value previously set with CURLOPT_PRIVATE, doesn't employ libcurl's CURLINFO_PRIVATE | *) |
| |
CURLINFO_HTTP_CONNECTCODE |
|||
| |
CURLINFO_HTTPAUTH_AVAIL |
|||
| |
CURLINFO_PROXYAUTH_AVAIL |
|||
| |
CURLINFO_OS_ERRNO |
|||
| |
CURLINFO_NUM_CONNECTS |
|||
| |
CURLINFO_SSL_ENGINES |
|||
| |
CURLINFO_COOKIELIST |
|||
| |
CURLINFO_LASTSOCKET |
|||
| |
CURLINFO_FTP_ENTRY_PATH |
|||
| |
CURLINFO_REDIRECT_URL |
|||
| |
CURLINFO_PRIMARY_IP |
|||
| |
CURLINFO_LOCAL_IP |
|||
| |
CURLINFO_LOCAL_PORT |
|||
| |
CURLINFO_CONDITION_UNMET |
|||
| |
CURLINFO_CERTINFO |
|||
| |
CURLINFO_ACTIVESOCKET |
|||
| |
CURLINFO_HTTP_VERSION |
type
curlInfoResult =
| |
CURLINFO_String of |
| |
CURLINFO_Long of |
| |
CURLINFO_Double of |
| |
CURLINFO_StringList of |
| |
CURLINFO_StringListList of |
| |
CURLINFO_Socket of |
| |
CURLINFO_Version of |
type
curlSslBackend =
| |
CURLSSLBACKEND_NONE |
| |
CURLSSLBACKEND_OPENSSL |
| |
CURLSSLBACKEND_GNUTLS |
| |
CURLSSLBACKEND_NSS |
| |
CURLSSLBACKEND_GSKIT |
| |
CURLSSLBACKEND_WOLFSSL |
| |
CURLSSLBACKEND_SCHANNEL |
| |
CURLSSLBACKEND_SECURETRANSPORT |
| |
CURLSSLBACKEND_MBEDTLS |
| |
CURLSSLBACKEND_MESALINK |
| |
CURLSSLBACKEND_BEARSSL |
type
curlSslSet =
| |
CURLSSLSET_OK |
| |
CURLSSLSET_UNKNOWN_BACKEND |
| |
CURLSSLSET_TOO_LATE |
| |
CURLSSLSET_NO_BACKENDS |
type
version_info = {
|
version : |
|||
|
number : |
|||
|
host : |
|||
|
features : |
|||
|
ssl_version : |
|||
|
libz_version : |
|||
|
protocols : |
|||
|
ares : |
(* | starting from this field are optional features - may be empty/zero | *) |
|
ares_num : |
|||
|
libidn : |
|||
|
iconv_ver_num : |
|||
|
libssh_version : |
}
type
pauseOption =
| |
PAUSE_SEND |
| |
PAUSE_RECV |
| |
PAUSE_ALL |
exception CurlSslSetException of curlSslSet
val global_sslset : curlSslBackend -> unit
val global_sslset_str : string -> unit
val global_sslsetavail : unit -> curlSslBackend list
val global_sslsetavail_str : unit -> string list
val global_init : initOption -> unit
val global_cleanup : unit -> unit
val init : unit -> t
val reset : t -> unit
Reset t
to the default state
val setopt : t -> curlOption -> unit
NotImplemented
for not implemented optionval perform : t -> unit
val cleanup : t -> unit
val getinfo : t -> curlInfo -> curlInfoResult
val escape : string -> string
val unescape : string -> string
val getdate : string -> float -> float
val version : unit -> string
val strerror : curlCode -> string
val int_of_curlCode : curlCode -> int
val curlCode_of_int : int -> curlCode option
same as int_of_curlCode
val errno : curlCode -> int
val version_info : unit -> version_info
val pause : t -> pauseOption list -> unit
flags set the new state, ie to unpause - pass empty list
All callback functions shouldn't raise exceptions. Any exception raised in callback function will be silently caught and discared, and transfer will be aborted.
val set_writefunction : t -> (string -> int) -> unit
val set_writefunction2 : t -> (string -> write_result) -> unit
val set_readfunction : t -> (int -> string) -> unit
readfunction n
should return string of length at most n
, otherwise
transfer will be aborted (as if with exception)
val set_readfunction2 : t -> (int -> read_result) -> unit
val set_infilesize : t -> int -> unit
val set_url : t -> string -> unit
val set_proxy : t -> string -> unit
val set_proxyport : t -> int -> unit
val set_httpproxytunnel : t -> bool -> unit
val set_verbose : t -> bool -> unit
val set_header : t -> bool -> unit
val set_noprogress : t -> bool -> unit
val set_nosignal : t -> bool -> unit
val set_nobody : t -> bool -> unit
val set_failonerror : t -> bool -> unit
val set_upload : t -> bool -> unit
val set_post : t -> bool -> unit
val set_ftplistonly : t -> bool -> unit
val set_ftpappend : t -> bool -> unit
val set_netrc : t -> curlNETRCOption -> unit
val set_encoding : t -> curlEncoding -> unit
val set_followlocation : t -> bool -> unit
val set_transfertext : t -> bool -> unit
val set_put : t -> bool -> unit
val set_userpwd : t -> string -> unit
val set_proxyuserpwd : t -> string -> unit
val set_range : t -> string -> unit
val set_errorbuffer : t -> string Stdlib.ref -> unit
val set_timeout : t -> int -> unit
val set_postfields : t -> string -> unit
val set_postfieldsize : t -> int -> unit
val set_referer : t -> string -> unit
val set_useragent : t -> string -> unit
val set_ftpport : t -> string -> unit
val set_lowspeedlimit : t -> int -> unit
val set_lowspeedtime : t -> int -> unit
val set_resumefrom : t -> int -> unit
t -> string -> unit
: val set_httpheader : t -> string list -> unit
val set_httppost : t -> curlHTTPPost list -> unit
val set_sslcert : t -> string -> unit
val set_sslcerttype : t -> string -> unit
val set_sslcertpasswd : t -> string -> unit
val set_sslkey : t -> string -> unit
val set_sslkeytype : t -> string -> unit
val set_sslkeypasswd : t -> string -> unit
val set_sslengine : t -> string -> unit
val set_sslenginedefault : t -> bool -> unit
val set_certinfo : t -> bool -> unit
val set_crlf : t -> bool -> unit
val set_quote : t -> string list -> unit
val set_postquote : t -> string list -> unit
val set_headerfunction : t -> (string -> int) -> unit
t -> string -> unit
: val set_sslversion : t -> curlSSLVersion -> unit
val set_timecondition : t -> curlTimeCondition -> unit
val set_timevalue : t -> int32 -> unit
val set_customrequest : t -> string -> unit
val set_interface : t -> string -> unit
val set_krb4level : t -> curlKRB4Level -> unit
val set_progressfunction : t -> (float -> float -> float -> float -> bool) -> unit
callback returns whether transfer should be interrupted, ie return false to continue transfering
val set_xferinfofunction : t -> (int64 -> int64 -> int64 -> int64 -> bool) -> unit
val set_sslverifypeer : t -> bool -> unit
val set_cainfo : t -> string -> unit
val set_capath : t -> string -> unit
val set_filetime : t -> bool -> unit
val set_maxredirs : t -> int -> unit
val set_maxconnects : t -> int -> unit
val set_closepolicy : t -> curlClosePolicy -> unit
val set_freshconnect : t -> bool -> unit
val set_forbidreuse : t -> bool -> unit
val set_randomfile : t -> string -> unit
val set_egdsocket : t -> string -> unit
val set_connecttimeout : t -> int -> unit
val set_httpget : t -> bool -> unit
val set_sslverifyhost : t -> curlSSLVerifyHost -> unit
t -> string -> unit
: val set_sslcipherlist : t -> string -> unit
val set_httpversion : t -> curlHTTPVersion -> unit
val set_ftpuseepsv : t -> bool -> unit
val set_dnscachetimeout : t -> int -> unit
val set_dnsuseglobalcache : t -> bool -> unit
val set_debugfunction : t -> (t -> curlDebugType -> string -> unit) -> unit
val set_private : t -> string -> unit
val set_http200aliases : t -> string list -> unit
val set_unrestrictedauth : t -> bool -> unit
val set_ftpuseeprt : t -> bool -> unit
val set_httpauth : t -> curlAuth list -> unit
val set_ftpcreatemissingdirs : t -> bool -> unit
val set_proxyauth : t -> curlAuth list -> unit
val set_ftpresponsetimeout : t -> int -> unit
val set_ipresolve : t -> curlIPResolve -> unit
val set_maxfilesize : t -> int32 -> unit
val set_infilesizelarge : t -> int64 -> unit
val set_resumefromlarge : t -> int64 -> unit
val set_maxfilesizelarge : t -> int64 -> unit
val set_netrcfile : t -> string -> unit
val set_ftpssl : t -> curlFTPSSL -> unit
val set_postfieldsizelarge : t -> int64 -> unit
val set_tcpnodelay : t -> bool -> unit
val set_tcpfastopen : t -> bool -> unit
val set_ftpsslauth : t -> curlFTPSSLAuth -> unit
val set_ioctlfunction : t -> (t -> curlIOCmd -> curlIOErr) -> unit
val set_ftpaccount : t -> string -> unit
t -> string -> unit
: val set_ignorecontentlength : t -> bool -> unit
val set_ftpskippasvip : t -> bool -> unit
val set_ftpfilemethod : t -> curlFTPMethod -> unit
val set_localport : t -> int -> unit
val set_localportrange : t -> int -> unit
val set_connectonly : t -> bool -> unit
val set_maxsendspeedlarge : t -> int64 -> unit
val set_maxrecvspeedlarge : t -> int64 -> unit
val set_ftpalternativetouser : t -> string -> unit
val set_sslsessionidcache : t -> bool -> unit
val set_sshauthtypes : t -> curlSSHAuthTypes list -> unit
val set_sshpublickeyfile : t -> string -> unit
val set_sshprivatekeyfile : t -> string -> unit
val set_ftpsslccc : t -> curlFTPSSLCCC -> unit
val set_timeoutms : t -> int -> unit
val set_connecttimeoutms : t -> int -> unit
val set_httptransferdecoding : t -> bool -> unit
val set_httpcontentdecoding : t -> bool -> unit
val set_newfileperms : t -> int -> unit
val set_newdirectoryperms : t -> int -> unit
val set_post301 : t -> bool -> unit
val set_sshhostpublickeymd5 : t -> string -> unit
val set_copypostfields : t -> string -> unit
val set_proxytransfermode : t -> bool -> unit
val set_seekfunction : t -> (int64 -> curlSeek -> curlSeekResult) -> unit
val set_autoreferer : t -> bool -> unit
val set_opensocketfunction : t -> (Unix.file_descr -> unit) -> unit
val set_proxytype : t -> curlProxyType -> unit
current implementation is faulty ref https://github.com/ygrek/ocurl/issues/58 val set_closesocketfunction : t -> (Unix.file_descr -> unit) -> unit
val set_protocols : t -> curlProto list -> unit
val set_redirprotocols : t -> curlProto list -> unit
val set_buffersize : t -> int -> unit
val set_doh_url : t -> string -> unit
val set_ssl_options : t -> curlSslOption list -> unit
val set_resolve : t -> (string * int * string) list -> (string * int) list -> unit
set_resolve t add del
adjusts builtin dns mapping
val set_dns_servers : t -> string list -> unit
val set_mailfrom : t -> string -> unit
val set_mailrcpt : t -> string list -> unit
val set_pipewait : t -> bool -> unit
val set_username : t -> string -> unit
val set_password : t -> string -> unit
val set_login_options : t -> string -> unit
val set_connect_to : t -> string list -> unit
val set_postredir : t -> curlPostRedir list -> unit
val set_mimepost : t -> curlMIMEPart list -> unit
val set_sshknownhosts : t -> string -> unit
val set_sshkeyfunction : t -> (curlKHMatch -> string -> curlKHStat) -> unit
val get_effectiveurl : t -> string
val get_redirecturl : t -> string
val get_httpcode : t -> int
val get_responsecode : t -> int
val get_totaltime : t -> float
val get_namelookuptime : t -> float
val get_connecttime : t -> float
val get_pretransfertime : t -> float
val get_sizeupload : t -> float
val get_sizedownload : t -> float
val get_speeddownload : t -> float
val get_speedupload : t -> float
val get_headersize : t -> int
val get_requestsize : t -> int
val get_sslverifyresult : t -> int
val get_filetime : t -> float
val get_contentlengthdownload : t -> float
val get_contentlengthupload : t -> float
val get_starttransfertime : t -> float
val get_contenttype : t -> string
val get_redirecttime : t -> float
val get_redirectcount : t -> int
val get_private : t -> string
val get_httpconnectcode : t -> int
val get_httpauthavail : t -> curlAuth list
val get_proxyauthavail : t -> curlAuth list
val get_oserrno : t -> int
val get_numconnects : t -> int
val get_sslengines : t -> string list
t -> string list
: val get_lastsocket : t -> int
val get_activesocket : t -> Unix.file_descr option
val get_ftpentrypath : t -> string
val get_primaryip : t -> string
val get_localip : t -> string
val get_localport : t -> int
val get_conditionunmet : t -> bool
val get_certinfo : t -> string list list
val get_http_version : t -> curlHTTPVersion
class handle :object
..end
module Multi:sig
..end
Curl multi stack.