Makefile: tweak
[ocurl.git] / curl.mli
blob2bbfff6e862ffa084ddf720787cc2b83ffabb364
1 (*
2 * curl.mli
4 * Copyright (c) 2003-2008, Lars Nilsson, <lars@quantumchamaeleon.com>
5 *)
7 type t
9 type curlCode =
10 | CURLE_OK
11 | CURLE_UNSUPPORTED_PROTOCOL
12 | CURLE_FAILED_INIT
13 | CURLE_URL_MALFORMAT
14 | CURLE_URL_MALFORMAT_USER
15 | CURLE_COULDNT_RESOLVE_PROXY
16 | CURLE_COULDNT_RESOLVE_HOST
17 | CURLE_COULDNT_CONNECT
18 | CURLE_FTP_WEIRD_SERVER_REPLY
19 | CURLE_FTP_ACCESS_DENIED
20 | CURLE_FTP_USER_PASSWORD_INCORRECT
21 | CURLE_FTP_WEIRD_PASS_REPLY
22 | CURLE_FTP_WEIRD_USER_REPLY
23 | CURLE_FTP_WEIRD_PASV_REPLY
24 | CURLE_FTP_WEIRD_227_FORMAT
25 | CURLE_FTP_CANT_GET_HOST
26 | CURLE_FTP_CANT_RECONNECT
27 | CURLE_FTP_COULDNT_SET_BINARY
28 | CURLE_PARTIAL_FILE
29 | CURLE_FTP_COULDNT_RETR_FILE
30 | CURLE_FTP_WRITE_ERROR
31 | CURLE_FTP_QUOTE_ERROR
32 | CURLE_HTTP_NOT_FOUND
33 | CURLE_WRITE_ERROR
34 | CURLE_MALFORMAT_USER
35 | CURLE_FTP_COULDNT_STOR_FILE
36 | CURLE_READ_ERROR
37 | CURLE_OUT_OF_MEMORY
38 | CURLE_OPERATION_TIMEOUTED
39 | CURLE_FTP_COULDNT_SET_ASCII
40 | CURLE_FTP_PORT_FAILED
41 | CURLE_FTP_COULDNT_USE_REST
42 | CURLE_FTP_COULDNT_GET_SIZE
43 | CURLE_HTTP_RANGE_ERROR
44 | CURLE_HTTP_POST_ERROR
45 | CURLE_SSL_CONNECT_ERROR
46 | CURLE_FTP_BAD_DOWNLOAD_RESUME
47 | CURLE_FILE_COULDNT_READ_FILE
48 | CURLE_LDAP_CANNOT_BIND
49 | CURLE_LDAP_SEARCH_FAILED
50 | CURLE_LIBRARY_NOT_FOUND
51 | CURLE_FUNCTION_NOT_FOUND
52 | CURLE_ABORTED_BY_CALLBACK
53 | CURLE_BAD_FUNCTION_ARGUMENT
54 | CURLE_BAD_CALLING_ORDER
55 | CURLE_HTTP_PORT_FAILED
56 | CURLE_BAD_PASSWORD_ENTERED
57 | CURLE_TOO_MANY_REDIRECTS
58 | CURLE_UNKNOWN_TELNET_OPTION
59 | CURLE_TELNET_OPTION_SYNTAX
60 | CURLE_OBSOLETE
61 | CURLE_SSL_PEER_CERTIFICATE
62 | CURLE_GOT_NOTHING
63 | CURLE_SSL_ENGINE_NOTFOUND
64 | CURLE_SSL_ENGINE_SETFAILED
65 | CURLE_SEND_ERROR
66 | CURLE_RECV_ERROR
67 | CURLE_SHARE_IN_USE
68 | CURLE_SSL_CERTPROBLEM
69 | CURLE_SSL_CIPHER
70 | CURLE_SSL_CACERT
71 | CURLE_BAD_CONTENT_ENCODING
72 | CURLE_LDAP_INVALID_URL
73 | CURLE_FILESIZE_EXCEEDED
74 | CURLE_USE_SSL_FAILED
75 | CURLE_SEND_FAIL_REWIND
76 | CURLE_SSL_ENGINE_INITFAILED
77 | CURLE_LOGIN_DENIED
78 | CURLE_TFTP_NOTFOUND
79 | CURLE_TFTP_PERM
80 | CURLE_REMOTE_DISK_FULL
81 | CURLE_TFTP_ILLEGAL
82 | CURLE_TFTP_UNKNOWNID
83 | CURLE_REMOTE_FILE_EXISTS
84 | CURLE_TFTP_NOSUCHUSER
85 | CURLE_CONV_FAILED
86 | CURLE_CONV_REQD
87 | CURLE_SSL_CACERT_BADFILE
88 | CURLE_REMOTE_FILE_NOT_FOUND
89 | CURLE_SSH
90 | CURLE_SSL_SHUTDOWN_FAILED
91 | CURLE_AGAIN
93 exception CurlException of (curlCode * int * string)
95 type curlNETRCOption =
96 | CURL_NETRC_OPTIONAL
97 | CURL_NETRC_IGNORED
98 | CURL_NETRC_REQUIRED
100 type curlEncoding =
101 | CURL_ENCODING_NONE (* identity *)
102 | CURL_ENCODING_DEFLATE (* deflate *)
103 | CURL_ENCODING_GZIP (* gzip *)
104 | CURL_ENCODING_ANY (* all supported encodings *)
106 type curlContentType =
107 | DEFAULT
108 | CONTENTTYPE of string
110 type curlHTTPPost =
111 | CURLFORM_CONTENT of string * string * curlContentType
112 | CURLFORM_FILECONTENT of string * string * curlContentType
113 | CURLFORM_FILE of string * string * curlContentType
114 | CURLFORM_BUFFER of string * string * string * curlContentType
117 type curlHTTPPost =
118 | CURLFORM_COPYNAME of string
119 | CURLFORM_PTRNAME of string
120 | CURLFORM_NAMELENGTH of int
121 | CURLFORM_COPYCONTENTS of string
122 | CURLFORM_PTRCONTENTS of string
123 | CURLFORM_FILE of string
124 | CURLFORM_FILECONTENT of string
125 | CURLFORM_CONTENTSLENGTH of int
126 | CURLFORM_CONTENTTYPE of string
129 type curlTimeCondition =
130 | TIMECOND_IFMODSINCE
131 | TIMECOND_IFUNMODSINCE
133 type curlKRB4Level =
134 | KRB4_NONE
135 | KRB4_CLEAR
136 | KRB4_SAFE
137 | KRB4_CONFIDENTIAL
138 | KRB4_PRIVATE
140 type curlClosePolicy =
141 | CLOSEPOLICY_OLDEST
142 | CLOSEPOLICY_LEAST_RECENTLY_USED
144 type curlSSLVerifyHost =
145 | SSLVERIFYHOST_NONE (** connection succeeds regardless of the names in the certificate *)
146 | SSLVERIFYHOST_EXISTENCE (** certificate must contain a Common Name field, but it doesn’t matter what name it says *)
147 | SSLVERIFYHOST_HOSTNAME (** certificate must indicate the matching hostname, or the connection fails *)
149 type curlHTTPVersion =
150 | HTTP_VERSION_NONE
151 | HTTP_VERSION_1_0
152 | HTTP_VERSION_1_1
154 type curlDebugType =
155 | DEBUGTYPE_TEXT
156 | DEBUGTYPE_HEADER_IN
157 | DEBUGTYPE_HEADER_OUT
158 | DEBUGTYPE_DATA_IN
159 | DEBUGTYPE_DATA_OUT
160 | DEBUGTYPE_END
162 type curlAuth =
163 | CURLAUTH_BASIC
164 | CURLAUTH_DIGEST
165 | CURLAUTH_GSSNEGOTIATE
166 | CURLAUTH_NTLM
167 | CURLAUTH_ANY
168 | CURLAUTH_ANYSAFE
170 type curlIPResolve =
171 | IPRESOLVE_WHATEVER
172 | IPRESOLVE_V4
173 | IPRESOLVE_V6
175 type curlFTPSSL =
176 | FTPSSL_NONE
177 | FTPSSL_TRY
178 | FTPSSL_CONTROL
179 | FTPSSL_ALL
181 type curlFTPSSLAuth =
182 | FTPAUTH_DEFAULT
183 | FTPAUTH_SSL
184 | FTPAUTH_TLS
186 type curlIOCmd =
187 | IOCMD_NOP
188 | IOCMD_RESTARTREAD
190 type curlIOErr =
191 | IOE_OK
192 | IOE_UNKNOWNCMD
193 | IOE_FAILRESTART
195 type curlFTPMethod =
196 | FTPMETHOD_DEFAULT
197 | FTPMETHOD_MULTICWD
198 | FTPMETHOD_NOCWD
199 | FTPMETHOD_SINGLECWD
201 type curlSSHAuthTypes =
202 | SSHAUTH_ANY
203 | SSHAUTH_PUBLICKEY
204 | SSHAUTH_PASSWORD
205 | SSHAUTH_HOST
206 | SSHAUTH_KEYBOARD
208 type curlFTPSSLCCC =
209 | FTPSSL_CCC_NONE
210 | FTPSSL_CCC_PASSIVE
211 | FTPSSL_CCC_ACTIVE
213 type curlSeek =
214 | SEEK_SET
215 | SEEK_CUR
216 | SEEK_END
218 type curlProxyType =
219 | CURLPROXY_HTTP
220 | CURLPROXY_HTTP_1_0 (** added in 7.19.4 *)
221 | CURLPROXY_SOCKS4 (** added in 7.15.2 *)
222 | CURLPROXY_SOCKS5
223 | CURLPROXY_SOCKS4A (** added in 7.18.0 *)
224 | CURLPROXY_SOCKS5_HOSTNAME (** added in 7.18.0 *)
226 type curlOption =
227 | CURLOPT_WRITEFUNCTION of (string -> int)
228 | CURLOPT_READFUNCTION of (int -> string)
229 | CURLOPT_INFILESIZE of int
230 | CURLOPT_URL of string
231 | CURLOPT_PROXY of string
232 | CURLOPT_PROXYPORT of int
233 | CURLOPT_HTTPPROXYTUNNEL of bool
234 | CURLOPT_VERBOSE of bool
235 | CURLOPT_HEADER of bool
236 | CURLOPT_NOPROGRESS of bool
237 | CURLOPT_NOSIGNAL of bool
238 | CURLOPT_NOBODY of bool
239 | CURLOPT_FAILONERROR of bool
240 | CURLOPT_UPLOAD of bool
241 | CURLOPT_POST of bool
242 | CURLOPT_FTPLISTONLY of bool
243 | CURLOPT_FTPAPPEND of bool
244 | CURLOPT_NETRC of curlNETRCOption
245 | CURLOPT_ENCODING of curlEncoding
246 | CURLOPT_FOLLOWLOCATION of bool
247 | CURLOPT_TRANSFERTEXT of bool
248 | CURLOPT_PUT of bool
249 | CURLOPT_USERPWD of string
250 | CURLOPT_PROXYUSERPWD of string
251 | CURLOPT_RANGE of string
252 | CURLOPT_ERRORBUFFER of string ref
253 | CURLOPT_TIMEOUT of int
254 | CURLOPT_POSTFIELDS of string
255 | CURLOPT_POSTFIELDSIZE of int
256 | CURLOPT_REFERER of string
257 | CURLOPT_USERAGENT of string
258 | CURLOPT_FTPPORT of string
259 | CURLOPT_LOWSPEEDLIMIT of int
260 | CURLOPT_LOWSPEEDTIME of int
261 | CURLOPT_RESUMEFROM of int
262 | CURLOPT_COOKIE of string
263 | CURLOPT_HTTPHEADER of string list
264 | CURLOPT_HTTPPOST of curlHTTPPost list
265 | CURLOPT_SSLCERT of string
266 | CURLOPT_SSLCERTTYPE of string
267 | CURLOPT_SSLCERTPASSWD of string
268 | CURLOPT_SSLKEY of string
269 | CURLOPT_SSLKEYTYPE of string
270 | CURLOPT_SSLKEYPASSWD of string
271 | CURLOPT_SSLENGINE of string
272 | CURLOPT_SSLENGINEDEFAULT of bool
273 | CURLOPT_CRLF of bool
274 | CURLOPT_QUOTE of string list
275 | CURLOPT_POSTQUOTE of string list
276 | CURLOPT_HEADERFUNCTION of (string -> int)
277 | CURLOPT_COOKIEFILE of string
278 | CURLOPT_SSLVERSION of int
279 | CURLOPT_TIMECONDITION of curlTimeCondition
280 | CURLOPT_TIMEVALUE of int32
281 | CURLOPT_CUSTOMREQUEST of string
282 | CURLOPT_STDERR (* UNIMPLEMENTED *)
283 | CURLOPT_INTERFACE of string
284 | CURLOPT_KRB4LEVEL of curlKRB4Level
285 | CURLOPT_PROGRESSFUNCTION of (float -> float -> float -> float -> bool)
286 | CURLOPT_SSLVERIFYPEER of bool
287 | CURLOPT_CAINFO of string
288 | CURLOPT_CAPATH of string
289 | CURLOPT_FILETIME of bool
290 | CURLOPT_MAXREDIRS of int
291 | CURLOPT_MAXCONNECTS of int
292 | CURLOPT_CLOSEPOLICY of curlClosePolicy
293 | CURLOPT_FRESHCONNECT of bool
294 | CURLOPT_FORBIDREUSE of bool
295 | CURLOPT_RANDOMFILE of string
296 | CURLOPT_EGDSOCKET of string
297 | CURLOPT_CONNECTTIMEOUT of int
298 | CURLOPT_HTTPGET of bool
299 | CURLOPT_SSLVERIFYHOST of curlSSLVerifyHost
300 | CURLOPT_COOKIEJAR of string
301 | CURLOPT_SSLCIPHERLIST of string
302 | CURLOPT_HTTPVERSION of curlHTTPVersion
303 | CURLOPT_FTPUSEEPSV of bool
304 | CURLOPT_DNSCACHETIMEOUT of int
305 | CURLOPT_DNSUSEGLOBALCACHE of bool
306 | CURLOPT_DEBUGFUNCTION of (t -> curlDebugType -> string -> unit)
307 | CURLOPT_PRIVATE of string
308 | CURLOPT_HTTP200ALIASES of string list
309 | CURLOPT_UNRESTRICTEDAUTH of bool
310 | CURLOPT_FTPUSEEPRT of bool
311 | CURLOPT_HTTPAUTH of curlAuth list
312 | CURLOPT_FTPCREATEMISSINGDIRS of bool
313 | CURLOPT_PROXYAUTH of curlAuth list
314 | CURLOPT_FTPRESPONSETIMEOUT of int
315 | CURLOPT_IPRESOLVE of curlIPResolve
316 | CURLOPT_MAXFILESIZE of int32
317 | CURLOPT_INFILESIZELARGE of int64
318 | CURLOPT_RESUMEFROMLARGE of int64
319 | CURLOPT_MAXFILESIZELARGE of int64
320 | CURLOPT_NETRCFILE of string
321 | CURLOPT_FTPSSL of curlFTPSSL
322 | CURLOPT_POSTFIELDSIZELARGE of int64
323 | CURLOPT_TCPNODELAY of bool
324 | CURLOPT_FTPSSLAUTH of curlFTPSSLAuth
325 | CURLOPT_IOCTLFUNCTION of (t -> curlIOCmd -> curlIOErr)
326 | CURLOPT_FTPACCOUNT of string
327 | CURLOPT_COOKIELIST of string
328 | CURLOPT_IGNORECONTENTLENGTH of bool
329 | CURLOPT_FTPSKIPPASVIP of bool
330 | CURLOPT_FTPFILEMETHOD of curlFTPMethod
331 | CURLOPT_LOCALPORT of int
332 | CURLOPT_LOCALPORTRANGE of int
333 | CURLOPT_CONNECTONLY of bool
334 | CURLOPT_MAXSENDSPEEDLARGE of int64
335 | CURLOPT_MAXRECVSPEEDLARGE of int64
336 | CURLOPT_FTPALTERNATIVETOUSER of string
337 | CURLOPT_SSLSESSIONIDCACHE of bool
338 | CURLOPT_SSHAUTHTYPES of curlSSHAuthTypes list
339 | CURLOPT_SSHPUBLICKEYFILE of string
340 | CURLOPT_SSHPRIVATEKEYFILE of string
341 | CURLOPT_FTPSSLCCC of curlFTPSSLCCC
342 | CURLOPT_TIMEOUTMS of int
343 | CURLOPT_CONNECTTIMEOUTMS of int
344 | CURLOPT_HTTPTRANSFERDECODING of bool
345 | CURLOPT_HTTPCONTENTDECODING of bool
346 | CURLOPT_NEWFILEPERMS of int
347 | CURLOPT_NEWDIRECTORYPERMS of int
348 | CURLOPT_POST301 of bool
349 | CURLOPT_SSHHOSTPUBLICKEYMD5 of string
350 | CURLOPT_COPYPOSTFIELDS of string
351 | CURLOPT_PROXYTRANSFERMODE of bool
352 | CURLOPT_SEEKFUNCTION of (int64 -> curlSeek -> int)
353 | CURLOPT_AUTOREFERER of bool
354 | CURLOPT_OPENSOCKETFUNCTION of (Unix.file_descr -> unit)
355 | CURLOPT_PROXYTYPE of curlProxyType
357 type initOption =
358 | CURLINIT_GLOBALALL
359 | CURLINIT_GLOBALSSL
360 | CURLINIT_GLOBALWIN32
361 | CURLINIT_GLOBALNOTHING
363 type curlInfo =
364 | CURLINFO_EFFECTIVE_URL
365 | CURLINFO_HTTP_CODE
366 | CURLINFO_RESPONSE_CODE
367 | CURLINFO_TOTAL_TIME
368 | CURLINFO_NAMELOOKUP_TIME
369 | CURLINFO_CONNECT_TIME
370 | CURLINFO_PRETRANSFER_TIME
371 | CURLINFO_SIZE_UPLOAD
372 | CURLINFO_SIZE_DOWNLOAD
373 | CURLINFO_SPEED_DOWNLOAD
374 | CURLINFO_SPEED_UPLOAD
375 | CURLINFO_HEADER_SIZE
376 | CURLINFO_REQUEST_SIZE
377 | CURLINFO_SSL_VERIFYRESULT
378 | CURLINFO_FILETIME
379 | CURLINFO_CONTENT_LENGTH_DOWNLOAD
380 | CURLINFO_CONTENT_LENGTH_UPLOAD
381 | CURLINFO_STARTTRANSFER_TIME
382 | CURLINFO_CONTENT_TYPE
383 | CURLINFO_REDIRECT_TIME
384 | CURLINFO_REDIRECT_COUNT
385 | CURLINFO_PRIVATE
386 | CURLINFO_HTTP_CONNECTCODE
387 | CURLINFO_HTTPAUTH_AVAIL
388 | CURLINFO_PROXYAUTH_AVAIL
389 | CURLINFO_OS_ERRNO
390 | CURLINFO_NUM_CONNECTS
391 | CURLINFO_SSL_ENGINES
392 | CURLINFO_COOKIELIST
393 | CURLINFO_LASTSOCKET
394 | CURLINFO_FTP_ENTRY_PATH
395 | CURLINFO_REDIRECT_URL
396 | CURLINFO_PRIMARY_IP
398 type curlInfoResult =
399 | CURLINFO_String of string
400 | CURLINFO_Long of int
401 | CURLINFO_Double of float
402 | CURLINFO_StringList of string list
404 type version_info = {
405 version : string;
406 number : int * int * int;
407 host : string;
408 features : int;
409 ssl_version : string option;
410 libz_version : string option;
411 protocols : string list;
414 val global_init : initOption -> unit
415 val global_cleanup : unit -> unit
416 val init : unit -> t
417 (** Reset [t] to the default state *)
418 val reset : t -> unit
419 val duphandle : t -> t
420 val setopt : t -> curlOption -> unit
421 val perform : t -> unit
422 val cleanup : t -> unit
423 val getinfo : t -> curlInfo -> curlInfoResult
424 val escape : string -> string
425 val unescape : string -> string
426 val getdate : string -> float -> float
427 val version : unit -> string
428 val strerror : curlCode -> string
429 val errno : curlCode -> int
430 val version_info : unit -> version_info
432 val set_writefunction : t -> (string -> int) -> unit
433 val set_readfunction : t -> (int -> string) -> unit
434 val set_infilesize : t -> int -> unit
435 val set_url : t -> string -> unit
436 val set_proxy : t -> string -> unit
437 val set_proxyport : t -> int -> unit
438 val set_httpproxytunnel : t -> bool -> unit
439 val set_verbose : t -> bool -> unit
440 val set_header : t -> bool -> unit
441 val set_noprogress : t -> bool -> unit
442 val set_nosignal : t -> bool -> unit
443 val set_nobody : t -> bool -> unit
444 val set_failonerror : t -> bool -> unit
445 val set_upload : t -> bool -> unit
446 val set_post : t -> bool -> unit
447 val set_ftplistonly : t -> bool -> unit
448 val set_ftpappend : t -> bool -> unit
449 val set_netrc : t -> curlNETRCOption -> unit
450 val set_encoding : t -> curlEncoding -> unit
451 val set_followlocation : t -> bool -> unit
452 val set_transfertext : t -> bool -> unit
453 val set_put : t -> bool -> unit
454 val set_userpwd : t -> string -> unit
455 val set_proxyuserpwd : t -> string -> unit
456 val set_range : t -> string -> unit
457 val set_errorbuffer : t -> string ref -> unit
458 val set_timeout : t -> int -> unit
459 val set_postfields : t -> string -> unit
460 val set_postfieldsize : t -> int -> unit
461 val set_referer : t -> string -> unit
462 val set_useragent : t -> string -> unit
463 val set_ftpport : t -> string -> unit
464 val set_lowspeedlimit : t -> int -> unit
465 val set_lowspeedtime : t -> int -> unit
466 val set_resumefrom : t -> int -> unit
467 val set_cookie : t -> string -> unit
468 val set_httpheader : t -> string list -> unit
469 val set_httppost : t -> curlHTTPPost list -> unit
470 val set_sslcert : t -> string -> unit
471 val set_sslcerttype : t -> string -> unit
472 val set_sslcertpasswd : t -> string -> unit
473 val set_sslkey : t -> string -> unit
474 val set_sslkeytype : t -> string -> unit
475 val set_sslkeypasswd : t -> string -> unit
476 val set_sslengine : t -> string -> unit
477 val set_sslenginedefault : t -> bool -> unit
478 val set_crlf : t -> bool -> unit
479 val set_quote : t -> string list -> unit
480 val set_postquote : t -> string list -> unit
481 val set_headerfunction: t -> (string -> int) -> unit
482 val set_cookiefile : t -> string -> unit
483 val set_sslversion : t -> int -> unit
484 val set_timecondition : t -> curlTimeCondition -> unit
485 val set_timevalue : t -> int32 -> unit
486 val set_customrequest : t -> string -> unit
487 val set_interface : t -> string -> unit
488 val set_krb4level : t -> curlKRB4Level -> unit
489 val set_progressfunction : t -> (float -> float -> float -> float -> bool) -> unit
490 val set_sslverifypeer : t -> bool -> unit
491 val set_cainfo : t -> string -> unit
492 val set_capath : t -> string -> unit
493 val set_filetime : t -> bool -> unit
494 val set_maxredirs : t -> int -> unit
495 val set_maxconnects : t -> int -> unit
496 val set_closepolicy : t -> curlClosePolicy -> unit
497 val set_freshconnect : t -> bool -> unit
498 val set_forbidreuse : t -> bool -> unit
499 val set_randomfile : t -> string -> unit
500 val set_egdsocket : t -> string -> unit
501 val set_connecttimeout : t -> int -> unit
502 val set_httpget : t -> bool -> unit
503 val set_sslverifyhost : t -> curlSSLVerifyHost -> unit
504 val set_cookiejar : t -> string -> unit
505 val set_sslcipherlist : t -> string -> unit
506 val set_httpversion : t -> curlHTTPVersion -> unit
507 val set_ftpuseepsv : t -> bool -> unit
508 val set_dnscachetimeout : t -> int -> unit
509 val set_dnsuseglobalcache : t -> bool -> unit
510 val set_debugfunction : t -> (t -> curlDebugType -> string -> unit) -> unit
511 val set_private : t -> string -> unit
512 val set_http200aliases : t -> string list -> unit
513 val set_unrestrictedauth : t -> bool -> unit
514 val set_ftpuseeprt : t -> bool -> unit
515 val set_httpauth : t -> curlAuth list -> unit
516 val set_ftpcreatemissingdirs : t -> bool -> unit
517 val set_proxyauth : t -> curlAuth list -> unit
518 val set_ftpresponsetimeout : t -> int -> unit
519 val set_ipresolve : t -> curlIPResolve -> unit
520 val set_maxfilesize : t -> int32 -> unit
521 val set_infilesizelarge : t -> int64 -> unit
522 val set_resumefromlarge : t -> int64 -> unit
523 val set_maxfilesizelarge : t -> int64 -> unit
524 val set_netrcfile : t -> string -> unit
525 val set_ftpssl : t -> curlFTPSSL -> unit
526 val set_postfieldsizelarge : t -> int64 -> unit
527 val set_tcpnodelay : t -> bool -> unit
528 val set_ftpsslauth : t -> curlFTPSSLAuth -> unit
529 val set_ioctlfunction : t -> (t -> curlIOCmd -> curlIOErr) -> unit
530 val set_ftpaccount : t -> string -> unit
531 val set_cookielist : t -> string -> unit
532 val set_ignorecontentlength : t -> bool -> unit
533 val set_ftpskippasvip : t -> bool -> unit
534 val set_ftpfilemethod : t -> curlFTPMethod -> unit
535 val set_localport : t -> int -> unit
536 val set_localportrange : t -> int -> unit
537 val set_connectonly : t -> bool -> unit
538 val set_maxsendspeedlarge : t -> int64 -> unit
539 val set_maxrecvspeedlarge : t -> int64 -> unit
540 val set_ftpalternativetouser : t -> string -> unit
541 val set_sslsessionidcache : t -> bool -> unit
542 val set_sshauthtypes : t -> curlSSHAuthTypes list -> unit
543 val set_sshpublickeyfile : t -> string -> unit
544 val set_ftpsslccc : t -> curlFTPSSLCCC -> unit
545 val set_timeoutms : t -> int -> unit
546 val set_connecttimeoutms : t -> int -> unit
547 val set_httptransferdecoding : t -> bool -> unit
548 val set_httpcontentdecoding : t -> bool -> unit
549 val set_newfileperms : t -> int -> unit
550 val set_newdirectoryperms : t -> int -> unit
551 val set_post301 : t -> bool -> unit
552 val set_sshhostpublickeymd5 : t -> string -> unit
553 val set_copypostfields : t -> string -> unit
554 val set_proxytransfermode : t -> bool -> unit
555 val set_seekfunction : t -> (int64 -> curlSeek -> int) -> unit
556 val set_autoreferer : t -> bool -> unit
557 val set_opensocketfunction : t -> (Unix.file_descr -> unit) -> unit
558 val set_proxytype : t -> curlProxyType -> unit
560 val get_effectiveurl : t -> string
561 val get_redirecturl : t -> string
562 val get_httpcode : t -> int
563 val get_responsecode : t -> int
564 val get_totaltime : t -> float
565 val get_namelookuptime : t -> float
566 val get_connecttime : t -> float
567 val get_pretransfertime : t -> float
568 val get_sizeupload : t -> float
569 val get_sizedownload : t -> float
570 val get_speeddownload : t -> float
571 val get_speedupload : t -> float
572 val get_headersize : t -> int
573 val get_requestsize : t -> int
574 val get_sslverifyresult : t -> int
575 val get_filetime : t -> float
576 val get_contentlengthdownload : t -> float
577 val get_contentlengthupload : t -> float
578 val get_starttransfertime : t -> float
579 val get_contenttype : t -> string
580 val get_redirecttime : t -> float
581 val get_redirectcount : t -> int
582 val get_private : t -> string
583 val get_httpconnectcode : t -> int
584 val get_httpauthavail : t -> curlAuth list
585 val get_proxyauthavail : t -> curlAuth list
586 val get_oserrno : t -> int
587 val get_numconnects : t -> int
588 val get_sslengines : t -> string list
589 val get_cookielist : t -> string list
590 val get_lastsocket : t -> int
591 val get_ftpentrypath : t -> string
592 val get_primaryip : t -> string
594 class handle :
595 object ('a)
596 val conn : t
597 method cleanup : unit
598 method duphandle : 'a
599 method perform : unit
601 method set_writefunction : (string -> int) -> unit
602 method set_readfunction : (int -> string) -> unit
603 method set_infilesize : int -> unit
604 method set_url : string -> unit
605 method set_proxy : string -> unit
606 method set_proxyport : int -> unit
607 method set_httpproxytunnel : bool -> unit
608 method set_verbose : bool -> unit
609 method set_header : bool -> unit
610 method set_noprogress : bool -> unit
611 method set_nosignal : bool -> unit
612 method set_nobody : bool -> unit
613 method set_failonerror : bool -> unit
614 method set_upload : bool -> unit
615 method set_post : bool -> unit
616 method set_ftplistonly : bool -> unit
617 method set_ftpappend : bool -> unit
618 method set_netrc : curlNETRCOption -> unit
619 method set_encoding : curlEncoding -> unit
620 method set_followlocation : bool -> unit
621 method set_transfertext : bool -> unit
622 method set_put : bool -> unit
623 method set_userpwd : string -> unit
624 method set_proxyuserpwd : string -> unit
625 method set_range : string -> unit
626 method set_errorbuffer : string ref -> unit
627 method set_timeout : int -> unit
628 method set_postfields : string -> unit
629 method set_postfieldsize : int -> unit
630 method set_referer : string -> unit
631 method set_useragent : string -> unit
632 method set_ftpport : string -> unit
633 method set_lowspeedlimit : int -> unit
634 method set_lowspeedtime : int -> unit
635 method set_resumefrom : int -> unit
636 method set_cookie : string -> unit
637 method set_httpheader : string list -> unit
638 method set_httppost : curlHTTPPost list -> unit
639 method set_sslcert : string -> unit
640 method set_sslcerttype : string -> unit
641 method set_sslcertpasswd : string -> unit
642 method set_sslkey : string -> unit
643 method set_sslkeytype : string -> unit
644 method set_sslkeypasswd : string -> unit
645 method set_sslengine : string -> unit
646 method set_sslenginedefault : bool -> unit
647 method set_crlf : bool -> unit
648 method set_quote : string list -> unit
649 method set_postquote : string list -> unit
650 method set_headerfunction: (string -> int) -> unit
651 method set_cookiefile : string -> unit
652 method set_sslversion : int -> unit
653 method set_timecondition : curlTimeCondition -> unit
654 method set_timevalue : int32 -> unit
655 method set_customrequest : string -> unit
656 method set_interface : string -> unit
657 method set_krb4level : curlKRB4Level -> unit
658 method set_progressfunction :
659 (float -> float -> float -> float -> bool) -> unit
660 method set_sslverifypeer : bool -> unit
661 method set_cainfo : string -> unit
662 method set_capath : string -> unit
663 method set_filetime : bool -> unit
664 method set_maxredirs : int -> unit
665 method set_maxconnects : int -> unit
666 method set_closepolicy : curlClosePolicy -> unit
667 method set_freshconnect : bool -> unit
668 method set_forbidreuse : bool -> unit
669 method set_randomfile : string -> unit
670 method set_egdsocket : string -> unit
671 method set_connecttimeout : int -> unit
672 method set_httpget : bool -> unit
673 method set_sslverifyhost : curlSSLVerifyHost -> unit
674 method set_cookiejar : string -> unit
675 method set_sslcipherlist : string -> unit
676 method set_httpversion : curlHTTPVersion -> unit
677 method set_ftpuseepsv : bool -> unit
678 method set_dnscachetimeout : int -> unit
679 method set_dnsuseglobalcache : bool -> unit
680 method set_debugfunction : (t -> curlDebugType -> string -> unit) -> unit
681 method set_private : string -> unit
682 method set_http200aliases : string list -> unit
683 method set_unrestrictedauth : bool -> unit
684 method set_ftpuseeprt : bool -> unit
685 method set_httpauth : curlAuth list -> unit
686 method set_ftpcreatemissingdirs : bool -> unit
687 method set_proxyauth : curlAuth list -> unit
688 method set_ftpresponsetimeout : int -> unit
689 method set_ipresolve : curlIPResolve -> unit
690 method set_maxfilesize : int32 -> unit
691 method set_infilesizelarge : int64 -> unit
692 method set_resumefromlarge : int64 -> unit
693 method set_maxfilesizelarge : int64 -> unit
694 method set_netrcfile : string -> unit
695 method set_ftpssl : curlFTPSSL -> unit
696 method set_postfieldsizelarge : int64 -> unit
697 method set_tcpnodelay : bool -> unit
698 method set_ftpsslauth : curlFTPSSLAuth -> unit
699 method set_ioctlfunction : (t -> curlIOCmd -> curlIOErr) -> unit
700 method set_ftpaccount : string -> unit
701 method set_cookielist : string -> unit
702 method set_ignorecontentlength : bool -> unit
703 method set_ftpskippasvip : bool -> unit
704 method set_ftpfilemethod : curlFTPMethod -> unit
705 method set_localport : int -> unit
706 method set_localportrange : int -> unit
707 method set_connectonly : bool -> unit
708 method set_maxsendspeedlarge : int64 -> unit
709 method set_maxrecvspeedlarge : int64 -> unit
710 method set_ftpalternativetouser : string -> unit
711 method set_sslsessionidcache : bool -> unit
712 method set_sshauthtypes : curlSSHAuthTypes list -> unit
713 method set_sshpublickeyfile : string -> unit
714 method set_sshprivatekeyfile : string -> unit
715 method set_ftpsslccc : curlFTPSSLCCC -> unit
716 method set_timeoutms : int -> unit
717 method set_connecttimeoutms : int -> unit
718 method set_httptransferdecoding : bool -> unit
719 method set_httpcontentdecoding : bool -> unit
720 method set_newfileperms : int -> unit
721 method set_newdirectoryperms : int -> unit
722 method set_post301 : bool -> unit
723 method set_sshhostpublickeymd5 : string -> unit
724 method set_copypostfields : string -> unit
725 method set_proxytransfermode : bool -> unit
726 method set_seekfunction : (int64 -> curlSeek -> int) -> unit
727 method set_autoreferer : bool -> unit
728 method set_opensocketfunction : (Unix.file_descr -> unit) -> unit
729 method set_proxytype : curlProxyType -> unit
731 method get_effectiveurl : string
732 method get_httpcode : int
733 method get_responsecode : int
734 method get_totaltime : float
735 method get_namelookuptime : float
736 method get_connecttime : float
737 method get_pretransfertime : float
738 method get_sizeupload : float
739 method get_sizedownload : float
740 method get_speeddownload : float
741 method get_speedupload : float
742 method get_headersize : int
743 method get_requestsize : int
744 method get_sslverifyresult : int
745 method get_filetime : float
746 method get_contentlengthdownload : float
747 method get_contentlengthupload : float
748 method get_starttransfertime : float
749 method get_contenttype : string
750 method get_redirecttime : float
751 method get_redirectcount : int
752 method get_private : string
753 method get_httpconnectcode : int
754 method get_httpauthavail : curlAuth list
755 method get_proxyauthavail : curlAuth list
756 method get_oserrno : int
757 method get_numconnects : int
758 method get_sslengines : string list
759 method get_cookielist : string list
760 method get_lastsocket : int
761 method get_ftpentrypath : string
762 method get_primaryip : string
765 (** Curl multi stack. Functions may raise [Failure] on critical errors *)
766 module Multi : sig
768 (** type of Curl multi stack *)
769 type mt
771 (** create new multi stack *)
772 val create : unit -> mt
774 (** add handle to multi stack *)
775 val add : mt -> t -> unit
777 (** perform pending data transfers (if any) on all handles currently in multi stack
778 @return the number of handles that still transfer data *)
779 val perform : mt -> int
781 (** wait till there are some active data transfers on multi stack
782 @return whether [perform] should be called *)
783 val wait : mt -> bool
785 (** remove finished handle from the multi stack if any. The handle can be reused *)
786 val remove_finished : mt -> (t * curlCode) option
788 (** destroy multi handle (all transfers are stopped, but individual handles are left alive) *)
789 val cleanup : mt -> unit