-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.cURLClient
libcURL.cURLClient
Global Class cURLClient
Inherits libcURL.cURLSession
This class is a general purpose libcURL client derived from the slightly-less user-friendly cURLSession class. You may use an instance of cURLClient
anywhere a cURLSession
is expected.
An instance of cURLClient
is a self-contained "session". It maintains its own caches, options, connections, cookies, etc., and can operate on one URL at a time. No previous experience with libcURL is necessary to use this class. Transfers are initiated by calling one of the overloaded request methods :
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).
- Abort
- Close
- Constructor
- Get
- GetCookie
- GetDownloadedData
- GetInfo
- GetOption
GetResponseHeaders- Head
- IsOptionSet
- Perform
- Post
- Put
- Reset
- SetCookie
- SetOption
- SetRequestMethod
- SetUploadData
- Cookies As libcURL.CookieEngine
- EasyHandle As libcURL.EasyHandle
- HTTPAuthenticationMethod As libcURL.HTTPAuthMethods
- HTTPVersion As libcURL.HTTPVersion
- IsSSLCertOK As Boolean
- IsTransferComplete As Boolean
- LastError As Integer
- LastErrorMessage As String
- LastStatusCode As Integer
- Password As String
- Proxy As libcURL.ProxyEngine
- RequestHeaders As libcURL.RequestHeaderEngine
- ResponseHeaders As libcURL.ResponseHeaderEngine
- Username As String
- Yield As Boolean
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.