RestResult class
Result of REST call.
Constructors
-
RestResult(int status, dynamic data, Map<
String, String> headers)
Properties
- data → dynamic
-
Deserialized response body.
final
- error → bool
-
Convenient interpretation of HTTP status (>=500)
no setter
- failure → bool
-
Convenient interpretation of HTTP status (>=400 && < 500)
no setter
- forbidden → bool
-
Convenient interpretation of HTTP status (403)
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
final
- notAuthorized → bool
-
Convenient interpretation of HTTP status (401)
no setter
- notFound → bool
-
Convenient interpretation of HTTP status (404)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
HTTP status
final
- success → bool
-
Convenient interpretation of HTTP status (>=200 && < 300)
no setter
- successData → dynamic
-
If the result is success method returns data. If it's not, it throws 'this'.
no setter
Methods
-
assertSuccess(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
throwError(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited