-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.ListPtr
libcURL.ListPtr
Protected Class ListPtr
Inherits libcURL.cURLHandleThis class represents a singly-linked list of strings that is managed by libcURL. It is used by libcURL to represent such things as headers, cookie lists, FTP command sequences, and more. Use the Append method to add a string to the list.
Once the list is constructed you can pass it to the EasyHandle.SetOption method.
e.g. this sets some HTTP headers for an EasyHandle:
Dim headers As New libcURL.ListPtr
headers.Append("X-Hello: World")
headers.Append("X-Goodbye: Cruel World")
Dim curlget As New libcURL.EasyHandle
Call curlget.SetOption(libcURL.Opts.HTTPHEADER, headers)
Call curlget.Perform("http://www.example.com/", 5)The memory backing the ListPtr is allocated and owned by libcURL, but tied to the lifetime of the ListPtr object. Once the ListPtr is destroyed the memory is freed: you must maintain a reference to a ListPtr object for the entire duration of all associated transfers. If the object is destroyed while libcURL is still using the memory then the application will crash hard.
- FTP custom commands example
- EasyHandle.SetRequestHeader
- cURLSession.RequestHeaders
-
curl_slist_appendin the libcURL documentation.
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.