URLResponse class

The metadata associated with the response to a URL load request, independent of protocol and URL scheme.

Constructors

URLResponse({required int expectedContentLength, Map<String, String>? headers, String? mimeType, int? statusCode, String? suggestedFilename, String? textEncodingName, WebUri? url})

Properties

expectedContentLength int
The expected length of the response’s content.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
All HTTP header fields of the response.
getter/setter pair
mimeType String?
The MIME type of the response.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int?
The response’s HTTP status code.
getter/setter pair
suggestedFilename String?
A suggested filename for the response data.
getter/setter pair
textEncodingName String?
The name of the text encoding provided by the response’s originating source.
getter/setter pair
url WebUri?
The URL for the response.
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) URLResponse?
Gets a possible URLResponse instance from a Map value.