NetworkResponseBody class
Represents a fully captured response body.
Delivered through onNetworkLoadingFinished after the body has been
fully read, and accumulated into NetworkEntry instances by
NetworkCaptureController.
Constructors
Properties
- body ↔ String
-
Response body as a string, truncated to
InAppWebViewSettings.networkCaptureMaxBodySizecharacters when larger. When isBase64 istrue, this is the base64 encoding of a binary body.getter/setter pair -
bytes
→ List<
int> ? -
Decodes a base64-encoded binary body into bytes.
Returns
nullwhen isBase64 isfalse.no setter - decoded → dynamic
-
The parsed JSON value of body, when the body is valid JSON
(and not base64-encoded / truncated in a way that breaks parsing).
Returns
nullotherwise. The result is cached.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isBase64 ↔ bool
-
Whether body is a base64-encoded binary payload.
getter/setter pair
- mimeType ↔ String?
-
The MIME type of the response, if known.
getter/setter pair
- requestId ↔ String
-
Internal correlation id shared with the originating request/response.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ int
-
Original body size (in characters for text bodies, in bytes for binary
bodies), measured before truncation.
getter/setter pair
- truncated ↔ bool
-
Whether body was truncated.
getter/setter pair
- url ↔ WebUri
-
Response URL (may differ from the request URL after redirects).
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts instance to a map.
-
toMap(
) → Map< String, dynamic> - Converts instance to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMap(
Map< String, dynamic> ? map) → NetworkResponseBody? - Gets a possible NetworkResponseBody instance from a Map value.