{"id":14990030,"url":"https://github.com/charonn0/rb-libcurl","last_synced_at":"2025-07-20T15:02:07.636Z","repository":{"id":14489655,"uuid":"17202428","full_name":"charonn0/RB-libcURL","owner":"charonn0","description":"A Realbasic and Xojo binding to libcurl","archived":false,"fork":false,"pushed_at":"2024-11-27T07:51:41.000Z","size":3187,"stargazers_count":22,"open_issues_count":1,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-06T00:05:03.212Z","etag":null,"topics":["ftp","http","http2","https","libcurl","realbasic","sftp","xojo"],"latest_commit_sha":null,"homepage":"http://www.boredomsoft.org/rb-libcurl.bs","language":"REALbasic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charonn0.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"charonn0"}},"created_at":"2014-02-26T07:17:49.000Z","updated_at":"2024-11-27T07:51:45.000Z","dependencies_parsed_at":"2025-04-12T02:03:43.492Z","dependency_job_id":"6d447c1f-acd0-49d0-a7a8-53cebfbac227","html_url":"https://github.com/charonn0/RB-libcURL","commit_stats":{"total_commits":1337,"total_committers":3,"mean_commits":445.6666666666667,"dds":0.2924457741211668,"last_synced_commit":"6ec3e45e68402b051eda8abd1f94a7dc1dc8e633"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/charonn0/RB-libcURL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-libcURL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-libcURL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-libcURL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-libcURL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charonn0","download_url":"https://codeload.github.com/charonn0/RB-libcURL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-libcURL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266143940,"owners_count":23883067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ftp","http","http2","https","libcurl","realbasic","sftp","xojo"],"created_at":"2024-09-24T14:19:21.558Z","updated_at":"2025-07-20T15:02:06.201Z","avatar_url":"https://github.com/charonn0.png","language":"REALbasic","readme":"## Introduction\n[libcurl](http://curl.haxx.se/libcurl/c/libcurl.html) is a cross-platform multi-protocol network transfer library. It is widely used both as a stand-alone command-line utility and as a standard or optional library for [many programming languages](http://curl.haxx.se/libcurl/bindings.html) and development environments.\n\n**RB-libcURL** is a libcurl [binding](http://en.wikipedia.org/wiki/Language_binding) for Realbasic and Xojo (\"classic\" framework) projects. Library binaries for [various platforms](http://curl.haxx.se/download.html) are available, or can be built from source. \n\nThe minimum supported libcURL version is [7.15.2](https://github.com/charonn0/RB-libcURL/wiki/libcURL.IsAvailable). The recommended minimum version is [7.33.0](https://curl.haxx.se/changes.html#7_33_0). Versions prior to 7.33.0 will function with degraded features, but versions prior to 7.15.2 will not function properly at all. The minimum supported Xojo version is RS2010R4.\n\n## Example\nThis example performs a synchronous HTTP GET request on the calling thread. [**More examples**](https://github.com/charonn0/RB-libcURL/wiki#examples).\n```realbasic\n  Dim curl As New cURLClient\n  If curl.Get(\"http://www.example.com/index.html\") Then \n      Dim page As String = curl.GetDownloadedData()\n  End If\n```\n## Highlights\n* Synchronous and asynchronous transfers \n* Use any protocol supported by libcURL: DICT, FILE, FTP, FTPS, Gopher, HTTP(1.0, 1.1, and 2† ), HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.\n* Support for modern HTTP features like [persistent connections](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle.AutoDisconnect), [pipelining](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.HTTPPipelining), and [multiplexing](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.HTTPMultiplexing)†.\n* Automatic browser-like [HTTP cookie management](https://github.com/charonn0/RB-libcURL/wiki/libcURL.CookieEngine).\n* Automatic decompression of compressed HTTP downloads (i.e. `gzip` or `deflate`).†\n* Automatic decoding of HTTP chunked Transfer-Encoding.\n* SSL/TLS with [certificate validation](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle.Secure), using any one of several SSL libraries†.\n* Transparent support for [RB/Xojo threads](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.PerformOnce).\n* Full support for HTTP, SOCKS4, SOCKS4A, SOCKS5, and SOCKS5_HOSTNAME [proxy servers](https://github.com/charonn0/RB-libcURL/wiki/libcURL.ProxyEngine).\n* [Stream-oriented](https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLSession.Perform), using Xojo's built-in [Readable](https://documentation.xojo.com/api/language/readable.html) and [Writeable](https://documentation.xojo.com/api/language/writeable.html) interfaces. Download or upload directly to or from a file, [MemoryBlock](http://www.boredomsoft.org/string-building-in-realbasic.bs), Xojo socket, or your own custom class.\n* A [consistent, high-level API](https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLClient) over [the full range of libcURL's features](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle).\n* Interact directly with libcurl using idiomatic RB/Xojo objects, methods, and events; no shell or plugins required.\n* International domain name support†.\n* 64-bit ready.\n* IPv6 support.\n* High performance, even when doing several transfers at once.\n* Build complex [HTTP forms](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultipartForm), including nested forms and file uploads.\n\n†= feature might not be available at run-time due to a build-time decision of the installed version of libcURL\n\n## Become a sponsor\nIf you use this code in a commercial project, or just want to show your appreciation, please consider sponsoring me through GitHub. https://github.com/sponsors/charonn0\n\n## Synopsis\n\n***\nIt is strongly recommended that you familiarize yourself with [libcURL](http://curl.haxx.se/libcurl/c/libcurl-tutorial.html), as this project preserves the semantics of libcURL's API in an object-oriented, Xojo-flavored wrapper. \n\n**For a simplified client interface that is appropriate for most types of transfers, you should use the [`cURLClient`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLClient) class. Refer to the [examples](https://github.com/charonn0/RB-libcURL/wiki#examples) below for demonstrations of `cURLClient`.**\n\nFor more thorough documentation of individual classes and methods refer to the [wiki](https://github.com/charonn0/RB-libcURL/wiki).\n\n***\n\nEach libcURL [handle](https://en.wikipedia.org/wiki/Handle_%28computing%29) or handle equivalent is managed by an object class. These handle-managing classes all descend from a common ancestor, the abstract [`cURLHandle`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLHandle) class. \n\nlibcURL uses several different handle types or equivalents:\n\n|Handle Type|Object Class|Comment|\n|-----------|------------|-------|\n|[`curl_easy`](http://curl.haxx.se/libcurl/c/libcurl-easy.html)|[`EasyHandle`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle)|A persistent collection of sockets, caches, and options which together will be used when libcURL is told to perform a transfer.| \n|[`curl_multi`](http://curl.haxx.se/libcurl/c/libcurl-multi.html)|[`MultiHandle`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle)|A set of one or more `curl_easy` handles whose transfers will be performed simultaneously.|\n|[`curl_share`](http://curl.haxx.se/libcurl/c/libcurl-share.html)|[`ShareHandle`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.ShareHandle)|A set of one or more `curl_easy` handles that will share SSL session data, DNS caches, and/or HTTP cookies.|\n|[`slist`](http://curl.haxx.se/libcurl/c/curl_slist_append.html)|[`ListPtr`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr)|A linked list of string values.|\n|[`form`](http://curl.haxx.se/libcurl/c/curl_formadd.html)|[`MultipartForm`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultipartForm)|An HTTP form which libcURL will encode as `multipart/form-data`.|\n|[`mime`](https://curl.haxx.se/libcurl/c/curl_mime_init.html)|[`MIMEMessage`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MIMEMessage)|A MIME message (HTTP form, email message, etc.) (libcURL 7.56.0 or later)|\n|[`url`](https://curl.haxx.se/libcurl/c/curl_url.html)|[`URLParser`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.URLParser)|An interface to libcurl's URL parser (libcURL 7.62.0 or later)|\n\nEvery transfer is associated with an `EasyHandle`. After creating a new `EasyHandle` instance, you can set various options for the handle by calling the [`SetOption`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle.SetOption) method with the desired [cURL option number](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html) and its new value. Options will persist until they are overwritten or reset.\n\nOnce all the desired options have been set (e.g. URL, port, username and/or password, cookies, etc.) you are ready to begin the transfer. Depending on your specific requirements, you can do it in one of several ways. \n\nYou may call [`EasyHandle.Perform`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.EasyHandle.Perform) directly. However, this is a blocking call; not merely synchronous: the _entire application_ blocks for the duration of the transfer. As such, it is useful only in single-threaded console applications.\n\nTo perform one or more transfers in a non-blocking manner use the `MultiHandle` class. The `MultiHandle` class represents a `curl_multi` handle (AKA a \"stack\"). [Add](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.AddItem) the `EasyHandle` to the multi stack and then call [`MultiHandle.Perform`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.Perform) (or [`MultiHandle.PerformOnce`](https://github.com/charonn0/RB-libcURL/wiki/libcURL.MultiHandle.PerformOnce) on a RB/Xojo thread.)\n\n## How to incorporate libcURL into your Realbasic/Xojo project\n### Import the libcURL module\n1. Download the RB-libcURL project either in [ZIP archive format](https://github.com/charonn0/RB-libcURL/archive/master.zip) or by cloning the repository with your Git client.\n2. Open the RB-libcURL project in REALstudio or Xojo. Open your project in a separate window.\n3. Copy the libcURL module and the DEFAULT_CA_INFO_PEM file into your project and save.\n\n### Ensure the libcURL shared library is installed\nlibcURL is installed by default on most Unix-like operating systems, including OS X and most Linux distributions. \n\nWindows does not have it installed by default, you will need to ship all the necessary DLLs with your application. You can use pre-built DLLs available [here](https://curl.haxx.se/download.html), or you can [build them yourself from source](https://github.com/blackrosezy/build-libcurl-windows). For 64-bit builds you must rename the `libcurl-x64.dll` file to `libcurl.dll`.\n\nDepending on compile-time options, you may need to include additional DLLs for other libraries like OpenSSL or ZLib. Newly added features like HTTP/2 support may require building the latest version from source with special build flags and additional libraries. Review the libcURL documentation for the feature you're interested in.\n\nRB-libcURL will raise a PlatformNotSupportedException when used if all required DLLs/SOs/DyLibs are not available at runtime. \n\n## Examples\n* [HTTP GET](https://github.com/charonn0/RB-libcURL/wiki/HTTP-GET-Example)\n* [HTTP GET with a persistent connection](https://github.com/charonn0/RB-libcURL/wiki/HTTP-persistent-connection-example)\n* [HTTP GET with pipelining](https://github.com/charonn0/RB-libcURL/wiki/HTTP-Pipelining-Example)\n* [HTTP HEAD](https://github.com/charonn0/RB-libcURL/wiki/HTTP-HEAD-Example)\n* [HTTP POST](https://github.com/charonn0/RB-libcURL/wiki/HTTP-POST-Example)\n* [HTTP TRACE](https://github.com/charonn0/RB-libcURL/wiki/HTTP-TRACE-Example)\n* [HTTP Cookies](https://github.com/charonn0/RB-libcURL/wiki/HTTP-Cookies-Example)\n* [Using a proxy](https://github.com/charonn0/RB-libcURL/wiki/Proxying-Example)\n* [FTP Download](https://github.com/charonn0/RB-libcURL/wiki/FTP-Download-Example)\n* [FTP Upload](https://github.com/charonn0/RB-libcURL/wiki/FTP-Upload-Example)\n* [FTP custom commands](https://github.com/charonn0/RB-libcURL/wiki/FTP-custom-commands)\n* [FTP directory listing](https://github.com/charonn0/RB-libcURL/wiki/FTP-Directory-Listing-Example)\n* [SMTP Send](https://github.com/charonn0/RB-libcURL/wiki/SMTP-Example)\n* [POP3 examples](https://github.com/charonn0/RB-libcURL/wiki/POP3-Examples)\n* [DNS control](https://github.com/charonn0/RB-libcURL/wiki/DNS-Example)\n* [DICT lookup example](https://github.com/charonn0/RB-libcURL/wiki/DICT-example)\n* [FILE protocol example](https://github.com/charonn0/RB-libcURL/wiki/FILE-protocol-example)\n* [Multiple Simultaneous Transfers](https://github.com/charonn0/RB-libcURL/wiki/Multiple-Simultaneous-Transfers)\n* [Query the server for protocol-specific metadata](https://github.com/charonn0/RB-libcURL/wiki/Query-URL-metadata-example)\n\n![Powered by libcURL](https://raw.githubusercontent.com/wiki/charonn0/RB-libcURL/powered_by_curl7.gif)\n","funding_links":["https://github.com/sponsors/charonn0"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Frb-libcurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharonn0%2Frb-libcurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Frb-libcurl/lists"}