This API documentation is for Ballerina 1.2.0. View API documentation for the latest release.

Constants - mime

  • LEADING string leading
  • Header is placed before the payload of the request/response.

  • TRAILING string trailing
  • Header is placed after the payload of the request/response.

  • APPLICATION_OCTET_STREAM string application/octet-stream
  • Represents the application/octet-stream media type.

  • APPLICATION_JSON string application/json
  • Represents the application/json media type.

  • APPLICATION_XML string application/xml
  • Represents the application/xml media type.

  • APPLICATION_SVG_XML string application/svg+xml
  • Represents the application/svg+xml media type.

  • APPLICATION_XHTML_XML string application/xhtml+xml
  • Represents the application/xhtml+xml media type.

  • APPLICATION_SOAP_XML string application/soap+xml
  • Represents the application/soap+xml media type.

  • APPLICATION_FORM_URLENCODED string application/x-www-form-urlencoded
  • Represents the application/x-www-form-urlencoded media type.

  • APPLICATION_PDF string application/pdf
  • Represents the application/pdf media type.

  • IMAGE_JPEG string image/jpeg
  • Represents the image/jpeg media type.

  • IMAGE_GIF string image/gif
  • Represents the image/gif media type.

  • IMAGE_PNG string image/png
  • Represents the image/png media type.

  • MULTIPART_FORM_DATA string multipart/form-data
  • Represents the multipart/form-data media type.

  • MULTIPART_MIXED string multipart/mixed
  • Represents the multipart/mixed media type.

  • MULTIPART_ALTERNATIVE string multipart/alternative
  • Represents the multipart/alternative media type.

  • Represents the multipart/related media type.

  • MULTIPART_PARALLEL string multipart/parallel
  • Represents the multipart/parallel media type.

  • TEXT_PLAIN string text/plain
  • Represents the text/plain media type.

  • TEXT_HTML string text/html
  • Represents the text/html media type.

  • TEXT_XML string text/xml
  • Represents the text/xml media type.

  • ENCODE_ERROR string {ballerina/mime}EncodingFailed
  • Identifies encoding errors.

  • DECODE_ERROR string {ballerina/mime}DecodingFailed
  • Identifies decoding errors.

  • GENERIC_MIME_ERROR string {ballerina/mime}GenericMimeError
  • Identifies generic errors related to MIME.

  • SET_HEADER_FAILED string {ballerina/mime}SetHeaderFailed
  • Identifies the set header errors.

  • READING_HEADER_FAILED string {ballerina/mime}ReadingHeaderFailed
  • Identifies header parsing errors.

  • PARSER_ERROR string {ballerina/mime}ParsingEntityBodyFailed
  • Identifies entity body parsing errors.

  • INVALID_CONTENT_TYPE string {ballerina/mime}InvalidContentType
  • Identifies errors related to content-type header.

  • HEADER_UNAVAILABLE string {ballerina/mime}HeaderUnavailable
  • Identifies errors related to header unavailability.

  • IDLE_TIMEOUT_TRIGGERED string {ballerina/mime}IdleTimeoutTriggeredError
  • Identifies errors related to read/write timeouts.

  • NO_CONTENT_ERROR_CODE string {ballerina/mime}NoContentError
  • Identifies the errors occurred due to payloads with no content.

  • BOUNDARY string boundary
  • Key name for boundary parameter in MediaType. This is needed for composite type media types.

  • START string start
  • Key name for start parameter in MediaType. This determines which part in the multipart message contains the payload.

  • TYPE string type
  • Key name for type parameter in MediaType. This indicates the MIME media type of the root body part.

  • CHARSET string charset
  • Key name for charset parameter in MediaType. This indicates the character set of the body text.

  • DEFAULT_CHARSET string UTF-8
  • Default charset to be used with MIME encoding and decoding.

  • CONTENT_ID string content-id
  • Represents content-id header name.

  • CONTENT_LENGTH string content-length
  • Represents content-length header name.

  • CONTENT_TYPE string content-type
  • Represents content-type header name.

  • CONTENT_DISPOSITION string content-disposition
  • Represents content-disposition header name.