-
Notifications
You must be signed in to change notification settings - Fork 22
Raw interface
uses Curl.Lib;
For handles (pointers to unknown structs): CURL*
→ HCurl
and so on. H = handle.
For callbacks: curl_lock_function
→ EvCurlLock
and so on. Ev = event.
For other types: CURLcode
→ TCurlCode
, curl_httppost *
→ PCurlHttpPost
and so on.
Of course, there is no C FILE*
in Pascal. Functions that use this pointer are present but unusable.
Straightforward, with three exceptions.
-
curl_easy_setopt
is type-safe. For raw unsafe function seecurl_easy_setopt_initial
. -
curl_formadd
has 10 versions with different number of parameters. All parameters are PAnsiChar, to simplify passing strings. If you want integer or pointer, just castPAnsiChar(x)
. For raw unsafe function seecurl_formadd_initial
, but it is EXTREMELY mistake-prone, I warned you!
Sorry, but to use new >2G files in x86, you need to use that initial mistake-prone function. Arrays do not support them, and I don’t know how to write something type-safe.
-
curl_easy_getinfo
is type-safe. For raw unsafe function seecurl_easy_getinfo_initial
.
ProxyFromIe
is a function that gets HTTP proxy from Internet Explorer.