-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.MultipartForm
libcURL.MultipartForm
##Class Declaration
Protected Class libcURL.MultipartForm
Inherits libcURL.cURLHandle
##Notes This class represents a linked list of form elements that are managed by libcURL. Use the AddElement method to add an element to the form. Form elements may be either strings or folderitems (for uploading)
Once the MultipartForm is constructed you can pass it to the EasyHandle.SetOption method using libcURL.Opts.HTTPPOST
as the option number.
e.g.
Dim frm As New libcURL.MultipartForm
Call frm.AddElement("username", "Bob")
Call frm.AddElement("fileupload", SpecialFolder.Desktop.Child("foo.bin"))
Dim sock As New EasyHandle
Call sock.SetOption(libcURL.Opts.HTTPPOST, frm)
Call sock.Perform("http://www.example.com/submit.php", 5)
You must maintain a reference to this object for the entire duration of all associated transfers. If the object goes out of scope and is destroyed then the underlying memory allocated by libcURL will be freed; doing this while libcURL is still using it will lead to failure.
##Methods
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.