Open the RB-libcURL project in REALstudio or Xojo.
Write plugins in xojo archive#
Write plugins in xojo how to#
PerformOnce on a RB/Xojo thread.) How to incorporate libcURL into your Realbasic/Xojo project Import the libcURL module Add the EasyHandle to the multi stack and then call MultiHandle. The MultiHandle class represents a curl_multi handle (AKA a "stack"). To perform one or more transfers in a non-blocking manner use the MultiHandle class. As such, it is useful only in single-threaded console applications. However, this is a blocking call not merely synchronous: the entire application blocks for the duration of the transfer. Depending on your specific requirements, you can do it in one of several ways. URL, port, username and/or password, cookies, etc.) you are ready to begin the transfer. Once all the desired options have been set (e.g. Options will persist until they are overwritten or reset. After creating a new EasyHandle instance, you can set various options for the handle by calling the SetOption method with the desired cURL option number and its new value.
LibcURL uses several different handle types or equivalents: Handle TypeĪ persistent collection of sockets, caches, and options which together will be used when libcURL is told to perform a transfer.Ī set of one or more curl_easy handles whose transfers will be performed simultaneously.Ī set of one or more curl_easy handles that will share SSL session data, DNS caches, and/or HTTP cookies.Īn HTTP form which libcURL will encode as multipart/form-data.Ī MIME message (HTTP form, email message, etc.) (libcURL 7.56.0 or later)Īn interface to libcurl's URL parser (libcURL 7.62.0 or later)Įvery transfer is associated with an EasyHandle. These handle-managing classes all descend from a common ancestor, the abstract cURLHandle class. Refer to the examples below for demonstrations of cURLClient.įor more thorough documentation of individual classes and methods refer to the wiki.Įach libcURL handle or handle equivalent is managed by an object class. It is strongly recommended that you familiarize yourself with libcURL, as this project preserves the semantics of libcURL's API in an object-oriented, Xojo-flavored wrapper.įor a simplified client interface that is appropriate for most types of transfers, you should use the cURLClient class. †= feature might not be available at run-time due to a build-time decision of the installed version of libcURL Synopsis