Ballerina Central will undergo scheduled maintenance on Wednesday, August 06, from 00:30 AM to 01:30 AM UTC. During this time, Ballerina Central login and sign up will be temporarily disabled. We appreciate your patience as we work to improve your experience. For more information, reach out to contact@ballerina.io

ballerina/mime Ballerina library

2.12.0

Overview

This module provides a set of APIs to work with messages, which follow the Multipurpose Internet Mail Extensions (MIME) specification as specified in the RFC 2045 standard.

Entity refers to the header fields and the content of a message or a part of the body in a multipart entity. 

Supported multipart types

The module supports multipart/form-data, multipart/mixed, multipart/alternative, multipart/related, and multipart/parallel as multipart content types.

Modify and retrieve the data in an entity

This module provides functions to set and get an entity body from different kinds of message types such as XML, text, JSON, byte[], and body parts. Headers can be modified through functions such as addHeader(), setHeader(), removeHeader(), etc.

Handle large files

The entity object method setFileAsEntityBody() can be used to set large files as the entity body and is able to read it as a stream using the getByteStream() function.

Import

import ballerina/mime;Copy

Other versions

See more...

Metadata

Released date: 5 months ago

Version: 2.12.0

License: Apache-2.0


Compatibility

Platform: java21

Ballerina version: 2201.12.0

GraalVM compatible: Yes


Pull count

Total: 567543

Current verison: 7682


Weekly downloads


Source repository


Keywords

mime

multipart

entity


Contributors