This is a full libcurl wrap for AHKv2.
Much work has been done to abstract away the need for a full understanding of curl's rather arcane architecture, while still allowing complete access to those inner workings when required.
- This is a full direct binding of libcurl, meaning that you have access to all known functions.
- The vast majority of libcurl's functionality has additionally been wrapped with sensible defaults.
- Numerous simultaneous curl handles are supported, as is the multi (aka Async) interface. All options are remembered per-handle.
- Transparently compressed transfers are on by default, saving bandwidth and time.
- You can download a file directly into RAM without touching the disk - very useful when working with APIs.
- A unique "magic" hybrid download mode is supported where the download starts in memory but flushes to disk when a certain size threshold is reached.
- Effortless POSTing of data from almost any source, be it a String, Integer, Object, Array, Map, Buffer, or even a FileObject.
- Similarly effortless building of complex MIME forms, with the same smart source handling.
- You can manually send and receive websocket traffic and protocol-level raw data.
- Full support for Descolada's fantastic AHK package manager, Aris.
- This is the recommended installation method!
- gather and clean the SetOpts after a handle finishes downloading
- add the other origin types to GetAllHeaders
- refactor out some pointer chasing during callbacks
- apply error tracing routine to all methods where it's not in effect
Implemented Functions
https://curl.se/libcurl/c/allfuncs.html| Wrapped? | Name | Notes |
|---|---|---|
| ✓ | curl_easy_cleanup | |
| ✓ | curl_easy_duphandle | |
| ✓ | curl_easy_getinfo | |
| ✓ | curl_easy_header | |
| ✓ | curl_easy_init | |
| ✓ | curl_easy_nextheader | |
| ✓ | curl_easy_option_by_id | |
| ✓ | curl_easy_option_by_name | |
| ✓ | curl_easy_option_next | |
| ✓ | curl_easy_pause | |
| ✓ | curl_easy_perform | called with .Sync() |
| ✓ | curl_easy_recv | |
| ✓ | curl_easy_reset | |
| ✓ | curl_easy_send | |
| ✓ | curl_easy_setopt | |
| ✓ | curl_easy_ssls_export | |
| ✓ | curl_easy_ssls_import | |
| ✓ | curl_easy_strerror | |
| ✓ | curl_easy_upkeep | |
| ✓ | curl_free | |
| ✓ | curl_getdate | |
| ✓ | curl_global_cleanup | |
| ✓ | curl_global_init | only default mode for now |
| ✓ | curl_global_init_mem | provide initMemMap callbacks |
| ✓ | curl_global_sslset | |
| ✓ | curl_mime_addpart | |
| ✓ | curl_global_trace | called with .ConfigureDebug() |
| ✓ | curl_mime_data | |
| ✓ | curl_mime_data_cb | |
| ✓ | curl_mime_encoder | |
| ✓ | curl_mime_filedata | |
| ✓ | curl_mime_filename | |
| ✓ | curl_mime_free | |
| ✓ | curl_mime_headers | |
| ✓ | curl_mime_init | |
| ✓ | curl_mime_name | |
| ✓ | curl_mime_subparts | |
| ✓ | curl_mime_type | |
| ✓ | curl_multi_add_handle | called with .ReadySync() |
| curl_multi_assign | ||
| ✓ | curl_multi_cleanup | |
| curl_multi_fdset | ||
| curl_multi_get_handles | ||
| ✓ | curl_multi_info_read | |
| ✓ | curl_multi_init | |
| ✓ | curl_multi_perform | called with .Async() |
| ✓ | curl_multi_remove_handle | |
| ✓ | curl_multi_setopt | |
| curl_multi_socket_action | ||
| ✓ | curl_multi_strerror | |
| curl_multi_timeout | ||
| curl_multi_poll | ||
| curl_multi_wait | ||
| curl_multi_waitfds | ||
| curl_multi_wakeup | ||
| curl_pushheader_byname | ||
| curl_pushheader_bynum | ||
| ✓ | curl_share_cleanup | |
| ✓ | curl_share_init | |
| ✓ | curl_share_setopt | |
| ✓ | curl_share_strerror | |
| ✓ | curl_slist_append | |
| ✓ | curl_slist_free_all | |
| ✓ | curl_strequal | called with .StrCompare() |
| ✓ | curl_strnequal | called with .StrCompare() |
| ✓ | curl_url | |
| ✓ | curl_url_cleanup | |
| ✓ | curl_url_dup | |
| ✓ | curl_url_get | |
| ✓ | curl_url_set | |
| ✓ | curl_url_strerror | |
| ✓ | curl_version | |
| ✓ | curl_version_info | |
| ✓ | curl_ws_recv | |
| ✓ | curl_ws_send | |
| ✓ | curl_ws_meta |
Deprecated Functions with Suggested Alternatives
| Wrapped? | Name | Alternative |
|---|---|---|
| ❌ | curl_easy_escape curl_easy_unescape curl_escape curl_unescape |
use the URL API |
| ❌ | curl_formadd curl_formfree curl_formget |
use the mime API |
| ❌ | curl_getenv | use AHK's EnvGet() |
| ❌ | curl_multi_socket curl_multi_socket_all |
use curl_multi_socket_action |
| ❌ | curl_mprintf curl_mvaprintf curl_mvfprintf curl_mvprintf curl_mvsnprintf |
use AHK's own text maniupulation |