ContentTypeHeader class
Eases reading content-type header values
- Inheritance
-
- Object
- ParameterizedHeader
- ContentTypeHeader
Constructors
- ContentTypeHeader(String rawValue)
- Creates a new content type header
- ContentTypeHeader.from(MediaType mediaType, {String? charset, String? boundary, bool? isFlowedFormat})
- Creates a content type header from the given mediaType.
Properties
- boundary ↔ String?
-
the boundary for content-type headers of
multipart
.getter/setter pair - charset ↔ String?
-
the used charset like 'utf-8',
this is always converted to lowercase if present
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFlowedFormat ↔ bool?
-
defines wether a
text/plain
content-header has aflowed=true
or semantically equivalent value.getter/setter pair - mediaType ↔ MediaType
-
The media type pf the content type header
getter/setter pair
-
parameters
→ Map<
String, String> -
Any parameters, for example charset, boundary, filename, etc
finalinherited
- rawValue ↔ String
-
The raw value of the header
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ String
-
The value without parameters as specified in the header,
eg
text/plain
for aContent-Type
header.getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeQuotes(
String value) → String -
Removes any double-quotes from the
value
when present.inherited -
render(
[StringBuffer? buffer]) → String -
Renders this field using the given
buffer
-
renderDateField(
String name, DateTime? date, StringBuffer buffer) → void -
Render the field with the given
name
anddate
value to thebuffer
.inherited -
renderField(
String name, String? value, StringBuffer buffer, {bool quote = false}) → void -
Renders the field with the given
name
andvalue
to thebuffer
.inherited -
renderRemainingFields(
StringBuffer buffer, {List< String> ? exclude}) → void -
Renders all remaining fields
inherited
-
setParameter(
String name, String quotedValue) → void -
Adds a new or replaces the existing parameter
name
with the valuequotedValue
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited