Skip to content
Andrew Lambert edited this page Jul 26, 2016 · 28 revisions

libcURL.cURLClient

##Class Declaration

 Global Class cURLClient
 Inherits libcURL.cURLManager

##Remarks This class is a simplified libcURL client which is based on the more generic/complex 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)

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; asynchronous requests will be performed on the main event loop. The event loop must be allowed to run in order for asynchronous transfers to operate. 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