Skip to content
Andrew Lambert edited this page Mar 15, 2017 · 28 revisions

libcURL.cURLClient

Class Declaration

 Global Class cURLClient
 Inherits libcURL.cURLManager

Remarks

This class is a general purpose libcURL client derived from the cURLManager class. You may use an instance of cURLClient anywhere a cURLManager is expected.

No previous experience with libcURL is necessary to use this class. Transfers are initiated by calling one of the overloaded request methods :

  • Get for downloading
  • Put for uploading
  • Head for a headers-only operation
  • Post for HTTP forms.

The names of these methods are borrowed from HTTP but do not imply HTTP as the protocol (except Post. See also: cURLClient.Perform). That being said, HTTP is assumed unless the URL or other options indicate a different protocol. You should always specify the protocol in the URL to avoid confusion.

This class can perform both synchronous and asynchronous transfers, depending on which version of a method is called: synchronous versions return True on success; asynchronous versions do not return a value.

Synchronous requests will be performed on the calling thread and will occasionally explicitly yield to allow other threads to run. Asynchronous requests will be performed on the main event loop; in console applications this means you must pump the event loop manually.

Each instance of cURLClient can process one transfer at a time. Attempting to initiate a new transfer before the previous transfer completes will raise a cURLException with error number CURLM_ADDED_ALREADY (7).

Event Definitions

Methods

Properties

Examples

See also

Clone this wiki locally