HttpStatus class
Represents a HTTP Status with helpers. Base for HttpResponse and HttpError.
Constructors
- HttpStatus(String url, String requestedURL, int status)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isError → bool
-
Returns
true
if status represents any kind of error.no setter - isNotOK → bool
-
Returns
true
if ![isOK]no setter - isOK → bool
-
Returns
true
if is a successful status.no setter - isStatusAccessError → bool
-
Returns
true
if is a Access Error status: 405..418 OR IN400, 403, 431, 451
.no setter - isStatusError → bool
-
Returns
true
if any error happens: isStatusNetworkError || isStatusServerError || isStatusAccessErrorno setter - isStatusForbidden → bool
-
Returns
true
if is 403 status (Forbidden).no setter - isStatusNetworkError → bool
-
Returns
true
if any network error happens.no setter - isStatusNotFound → bool
-
Returns
true
if is 404 status (Not Found).no setter - isStatusRedirect → bool
-
Returns
true
if is 300-303 or 307-308 status (Redirect).no setter - isStatusServerError → bool
-
Returns
true
if is a server error status: from range 500 to 599.no setter - isStatusSuccessful → bool
-
Returns
true
if is a successful status: from range 200 to 299.no setter - isStatusUnauthenticated → bool
-
Returns
true
if is 401 status (Unauthenticated).no setter - requestedURL → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
final
- url → String
-
final
Methods
-
isStatus(
int status) → bool -
Returns
true
if this status is equals parameterstatus
. -
isStatusInList(
List< int> statusList) → bool -
Returns
true
if this status is instatusList
. -
isStatusInRange(
int statusInit, int statusEnd) → bool -
Returns
true
if this status is in range of parametersstatusInit
andstatusEnd
. -
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