ResourceResponse class final
The answer to a resource request.
See mln_resource_response in the
C API reference.
Constructors
- ResourceResponse({ResourceResponseStatus status = const ResourceResponseStatus.fromRawValue(0), ResourceErrorReason errorReason = const ResourceErrorReason.fromRawValue(0), Uint8List? bytes, String errorMessage = '', bool mustRevalidate = false, int? modifiedUnixMs, int? expiresUnixMs, String etag = '', int? retryAfterUnixMs})
Properties
- bytes → Uint8List
-
The resource, for
ResourceResponseStatus.ok.final - errorMessage → String
-
A description of the error, for
ResourceResponseStatus.error.final - errorReason → ResourceErrorReason
-
Why the request failed, for
ResourceResponseStatus.error.final - etag → String
-
Empty when the resource has no ETag.
final
- expiresUnixMs → int?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- modifiedUnixMs → int?
-
final
- mustRevalidate → bool
-
Whether the library must request the resource again before it reuses this
copy.
final
- retryAfterUnixMs → int?
-
When to retry, for
ResourceResponseStatus.error.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → ResourceResponseStatus
-
final
Methods
-
copyWith(
{ResourceResponseStatus? status, ResourceErrorReason? errorReason, Uint8List? bytes, String? errorMessage, bool? mustRevalidate, int? modifiedUnixMs, int? expiresUnixMs, String? etag, int? retryAfterUnixMs}) → ResourceResponse - A copy of this value with the given members replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited