ContentType enum

Standardized content types supported by Spark.

This enum simplifies handling of common MIME types in HTTP requests and responses.

Inheritance
Available extensions

Values

json → const ContentType

JSON (application/json)

formUrlEncoded → const ContentType

Form URL Encoded (application/x-www-form-urlencoded)

multipart → const ContentType

Multipart Form Data (multipart/form-data)

text → const ContentType

Plain Text (text/*)

binary → const ContentType

Binary Data (application/octet-stream)

unknown → const ContentType

Unknown or unsupported content type

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

from(String? mimeType) ContentType
parses the ContentType from a MIME type string.

Constants

values → const List<ContentType>
A constant List of the values in this enum, in order of their declaration.