RequestBody class
The body of a request, read once.
Constructors
-
RequestBody(Map<
String, dynamic> map, {BodyKind kind = BodyKind.none, Object? json, String? text, List<MapEntry< ? parts})String, Object> > - RequestBody.empty()
- An empty body. Its map is made on the first read of map, so a request with no body (most GETs) makes no map. Each body has its own map, never a shared one, because apps write into it.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- json → Object?
-
The decoded JSON value, any type (a DTO reads this).
final
- kind → BodyKind
-
final
-
map
→ Map<
String, dynamic> -
The body as a map (
req.body). A repeated form key keeps the last value. Bracket keys nest:tags[]=a&tags[]=bgives a list.no setter -
parts
→ List<
MapEntry< ?String, Object> > -
The parts of a multipart body, in order, with repeated keys.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String?
-
The raw text of an urlencoded body.
final
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