Name
easy:Mime -- create a mime object (V2.0)
Synopsis
handle = easy:Mime()
Function
This creates a new mime object. This mime object can be subsequently filled using the mime API, then attached to some easy handle using easy:SetOpt_MIMEPost or added as a multipart in another mime handle's part using mimepart:Subparts().

Using a mime handle is the recommended way to post an HTTP form, format and send a multi-part email with SMTP or upload such an email to an IMAP server.

Inputs
none

Results
handle
mime object
Example
e = hurl.Easy()
m = e:MIME()
p = m:AddPart()
p:Name("data")
p:Data("This is the field data")
e:SetOpt_MIMEPost(m)
e:SetOpt_URL("https://example.com")
e:Perform()
e:Close()
m:Free()
The code above shows how to create a mime object that contains a single field which is then posted to a HTTP server.

Show TOC