[mime.parse]
mime.parse is a slot in the mime namespace, in Hyperlambda, the language of Magic Cloud. Parses a raw MIME message into a lambda tree of headers and body parts; commonly used for email or multipart payloads.
- Value (
mime-message), required: Raw MIME message to parse - Returns: Resolves to the parsed MIME entity content type as the node value, and headers, content, and nested entities as child nodes
Returned nodes
| Node | Type | Required | Description |
|---|---|---|---|
[headers] |
lambda | no | MIME headers from the parsed entity, excluding Content-Type because the entity content type is returned as the node value. |
[headers] / any node name |
string | no | Parsed MIME header value; child name is the header name. Can be repeated. |
[content] |
string|byte[] | no | Decoded MIME part content; text parts return string content and binary parts return byte[] content. |
[entity] |
string | no | Nested parsed MIME entity; node value is the nested entity content type, and children carry headers, content, and any deeper entities. Can be repeated. |
[entity] / [headers] |
lambda | no | MIME headers from the parsed entity, excluding Content-Type because the entity content type is returned as the node value. |
[entity] / [headers] / any node name |
string | no | Parsed MIME header value; child name is the header name. Can be repeated. |
[entity] / [content] |
string|byte[] | no | Decoded MIME part content; text parts return string content and binary parts return byte[] content. |
Nodes nested deeper than 6 levels, and nodes that repeat one of their own ancestors, are not listed. The JSON declaration below has all of them.
Guide: How to use [mime.parse]
JSON declaration
This is the complete declaration of mime.parse, as the running system describes it. It is also published as slot.json.
JSON declaration (loads when opened)
← mime.list |
all mime.* slots |