handle = easy:Mime()
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.
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.