-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.MIMEMessage
libcURL.MIMEMessage
Protected Class MIMEMessage
Inherits libcURL.cURLHandle
Note: This class is only available when using libcurl 7.56.0 or later.
This class represents a linked list of MIME parts that is managed by libcURL.
Use the AddElement method to add a part to the message. Message parts contents may be either a string, a FolderItem, another MIMEMessage
, or an object which implements the Readable
interface.
Once the MIMEMessage is constructed you can pass it to the EasyHandle.SetFormData method, or to the EasyHandle.SetOption method using libcURL.Opts.MIMEPOST
as the option number.
e.g.
Dim curl As New libcURL.EasyHandle
Dim frm As New libcURL.MIMEMessage(curl)
frm.AddElement("username", "Bob")
frm.AddElement("fileupload", SpecialFolder.Desktop.Child("foo.bin"))
Call curl.SetOption(libcURL.Opts.MIMEPOST, frm)
Call curl.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.
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.