Repository navigation
MIME Handle Reference
Qriist edited this page Sep 17, 2026
·
1 revision
The mime_handle manages multipart form encoding, allowing complex uploads where each field carries its own name, content, and type. This reference lists the core methods which operate on a mime_handle or mime_part, their primary function, and links to the official libcurl documentation.
| Method | Description | libcurl Reference |
|---|---|---|
MimeInit(easy_handle?) |
Creates a MIME handle associated with an easy handle. | curl_mime_init |
MimeCleanup(mime_handle?) |
Releases the MIME handle and all associated parts. | curl_mime_free |
| Method | Description | libcurl Reference |
|---|---|---|
MimeAddPart(mime_handle?) |
Initializes a new MIME part. | curl_mime_addpart |
AttachMimePart(partName, partContent, mime_handle?) |
Creates a part, assigns its name, auto-detects type, and attaches content. | curl_mime_addpart |
AttachMimeAsPart(partName, mime_to_embed, mime_handle?) |
Embeds an entire MIME handle as a nested part. | curl_mime_subparts |
| Method | Description | libcurl Reference |
|---|---|---|
MimePartName(mime_part, partName) |
Assigns the field name to a MIME part. | curl_mime_name |
MimePartData(mime_part, partContent) |
Attaches String, Object, Map, Buffer, or File content. | curl_mime_data |
MimePartType(mime_part, partContent?, override?) |
Sets or auto-detects the MIME type. | curl_mime_type |
MimePartEncoder(mime_part, encoding := "") |
Configures an encoder for the part. | curl_mime_encoder |
MimeTreatPartAsFile(mime_part, filename := "") |
Instructs the server to treat the part as a file. | curl_mime_filename |
SetMimePartHeaders(mime_part, headersObject) |
Sets custom HTTP headers for a specific part. | curl_mime_headers |
| Method | Description | libcurl Reference |
|---|---|---|
GetMimeType(sourceData) |
Returns the detected MIME type for a given source. | — |
- Easy Handle Reference — single transfer lifecycle
- URL Handle Reference — structured URL component access
- Utility Methods Reference — standalone helper functions
Foundations
Operations
- Download Modes
- Setting and Listing Options
- Setting and Inspecting Headers
- POST and Upload
- Multiple Easy Handles
- Async and Multi Interface
- URL Construction
- Share Interface
- MIME and Multipart
- Raw Send and Receive
- Pause and Resume
- WebSocket
- SSL Sessions
- Debug and Diagnostics
API Reference
- Easy Handle Reference
- Multi Handle Reference
- Share Handle Reference
- MIME Handle Reference
- URL Handle Reference
- Utility Methods Reference
- WebSocket Reference
Code Snippets