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
trueif status represents any kind of error.no setter - isNotOK → bool
-
Returns
trueif ![isOK]no setter - isOK → bool
-
Returns
trueif is a successful status.no setter - isStatusAccessError → bool
-
Returns
trueif is a Access Error status: 405..418 OR IN400, 403, 431, 451.no setter - isStatusError → bool
-
Returns
trueif any error happens: isStatusNetworkError || isStatusServerError || isStatusAccessErrorno setter - isStatusForbidden → bool
-
Returns
trueif is 403 status (Forbidden).no setter - isStatusNetworkError → bool
-
Returns
trueif any network error happens.no setter - isStatusNotFound → bool
-
Returns
trueif is 404 status (Not Found).no setter - isStatusRedirect → bool
-
Returns
trueif is 300-303 or 307-308 status (Redirect).no setter - isStatusServerError → bool
-
Returns
trueif is a server error status: from range 500 to 599.no setter - isStatusSuccessful → bool
-
Returns
trueif is a successful status: from range 200 to 299.no setter - isStatusUnauthenticated → bool
-
Returns
trueif 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
trueif this status is equals parameterstatus. -
isStatusInList(
List< int> statusList) → bool -
Returns
trueif this status is instatusList. -
isStatusInRange(
int statusInit, int statusEnd) → bool -
Returns
trueif this status is in range of parametersstatusInitandstatusEnd. -
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