Appearance
HttpStatus abstract ​
abstract class HttpStatusHTTP status codes. Exported in dart:io and dart:html.
Constructors ​
HttpStatus() ​
HttpStatus()Properties ​
hashCode no setter inherited ​
int get hashCodeThe hash code for this object.
A hash code is a single integer which represents the state of the object that affects operator == comparisons.
All objects have hash codes. The default hash code implemented by Object represents only the identity of the object, the same way as the default operator == implementation only considers objects equal if they are identical (see identityHashCode).
If operator == is overridden to use the object state instead, the hash code must also be changed to represent that state, otherwise the object cannot be used in hash based data structures like the default Set and Map implementations.
Hash codes must be the same for objects that are equal to each other according to operator ==. The hash code of an object should only change if the object changes in a way that affects equality. There are no further requirements for the hash codes. They need not be consistent between executions of the same program and there are no distribution guarantees.
Objects that are not equal are allowed to have the same hash code. It is even technically allowed that all instances have the same hash code, but if clashes happen too often, it may reduce the efficiency of hash-based data structures like HashSet or HashMap.
If a subclass overrides hashCode, it should override the operator == operator as well to maintain consistency.
Inherited from Object.
Implementation
dart
external int get hashCode;runtimeType no setter inherited ​
Type get runtimeTypeA representation of the runtime type of the object.
Inherited from Object.
Implementation
dart
external Type get runtimeType;Methods ​
noSuchMethod() inherited ​
dynamic noSuchMethod(Invocation invocation)Invoked when a nonexistent method or property is accessed.
A dynamic member invocation can attempt to call a member which doesn't exist on the receiving object. Example:
dart
dynamic object = 1;
object.add(42); // Statically allowed, run-time errorThis invalid code will invoke the noSuchMethod method of the integer 1 with an Invocation representing the .add(42) call and arguments (which then throws).
Classes can override noSuchMethod to provide custom behavior for such invalid dynamic invocations.
A class with a non-default noSuchMethod invocation can also omit implementations for members of its interface. Example:
dart
class MockList<T> implements List<T> {
noSuchMethod(Invocation invocation) {
log(invocation);
super.noSuchMethod(invocation); // Will throw.
}
}
void main() {
MockList().add(42);
}This code has no compile-time warnings or errors even though the MockList class has no concrete implementation of any of the List interface methods. Calls to List methods are forwarded to noSuchMethod, so this code will log an invocation similar to Invocation.method(#add, [42]) and then throw.
If a value is returned from noSuchMethod, it becomes the result of the original invocation. If the value is not of a type that can be returned by the original invocation, a type error occurs at the invocation.
The default behavior is to throw a NoSuchMethodError.
Inherited from Object.
Implementation
dart
@pragma("vm:entry-point")
@pragma("wasm:entry-point")
external dynamic noSuchMethod(Invocation invocation);toString() inherited ​
String toString()A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.
Inherited from Object.
Implementation
dart
external String toString();Operators ​
operator ==() inherited ​
The equality operator.
The default behavior for all Objects is to return true if and only if this object and other are the same object.
Override this method to specify a different equality relation on a class. The overriding method must still be an equivalence relation. That is, it must be:
Total: It must return a boolean for all arguments. It should never throw.
Reflexive: For all objects
o,o == omust be true.Symmetric: For all objects
o1ando2,o1 == o2ando2 == o1must either both be true, or both be false.Transitive: For all objects
o1,o2, ando3, ifo1 == o2ando2 == o3are true, theno1 == o3must be true.
The method should also be consistent over time, so whether two objects are equal should only change if at least one of the objects was modified.
If a subclass overrides the equality operator, it should override the hashCode method as well to maintain consistency.
Inherited from Object.
Implementation
dart
external bool operator ==(Object other);Constants ​
deprecated ACCEPTED ​
const int ACCEPTEDDEPRECATED
Use accepted instead
Implementation
dart
@Deprecated("Use accepted instead")
static const int ACCEPTED = accepted;accepted ​
const int acceptedImplementation
dart
static const int accepted = 202;alreadyReported ​
const int alreadyReportedImplementation
dart
static const int alreadyReported = 208;deprecated BAD_GATEWAY ​
const int BAD_GATEWAYDEPRECATED
Use badGateway instead
Implementation
dart
@Deprecated("Use badGateway instead")
static const int BAD_GATEWAY = badGateway;deprecated BAD_REQUEST ​
const int BAD_REQUESTDEPRECATED
Use badRequest instead
Implementation
dart
@Deprecated("Use badRequest instead")
static const int BAD_REQUEST = badRequest;badGateway ​
const int badGatewayImplementation
dart
static const int badGateway = 502;badRequest ​
const int badRequestImplementation
dart
static const int badRequest = 400;clientClosedRequest ​
const int clientClosedRequestImplementation
dart
static const int clientClosedRequest = 499;deprecated CONFLICT ​
const int CONFLICTDEPRECATED
Use conflict instead
Implementation
dart
@Deprecated("Use conflict instead")
static const int CONFLICT = conflict;conflict ​
const int conflictImplementation
dart
static const int conflict = 409;connectionClosedWithoutResponse ​
const int connectionClosedWithoutResponseImplementation
dart
static const int connectionClosedWithoutResponse = 444;deprecated CONTINUE ​
const int CONTINUEDEPRECATED
Use continue_ instead
Implementation
dart
@Deprecated("Use continue_ instead")
static const int CONTINUE = continue_;continue_ ​
const int continue_Implementation
dart
static const int continue_ = 100;deprecated CREATED ​
const int CREATEDDEPRECATED
Use created instead
Implementation
dart
@Deprecated("Use created instead")
static const int CREATED = created;created ​
const int createdImplementation
dart
static const int created = 201;deprecated EXPECTATION_FAILED ​
const int EXPECTATION_FAILEDDEPRECATED
Use expectationFailed instead
Implementation
dart
@Deprecated("Use expectationFailed instead")
static const int EXPECTATION_FAILED = expectationFailed;expectationFailed ​
const int expectationFailedImplementation
dart
static const int expectationFailed = 417;failedDependency ​
const int failedDependencyImplementation
dart
static const int failedDependency = 424;deprecated FORBIDDEN ​
const int FORBIDDENDEPRECATED
Use forbidden instead
Implementation
dart
@Deprecated("Use forbidden instead")
static const int FORBIDDEN = forbidden;forbidden ​
const int forbiddenImplementation
dart
static const int forbidden = 403;deprecated FOUND ​
const int FOUNDDEPRECATED
Use found instead
Implementation
dart
@Deprecated("Use found instead")
static const int FOUND = found;found ​
const int foundImplementation
dart
static const int found = 302;deprecated GATEWAY_TIMEOUT ​
const int GATEWAY_TIMEOUTDEPRECATED
Use gatewayTimeout instead
Implementation
dart
@Deprecated("Use gatewayTimeout instead")
static const int GATEWAY_TIMEOUT = gatewayTimeout;gatewayTimeout ​
const int gatewayTimeoutImplementation
dart
static const int gatewayTimeout = 504;deprecated GONE ​
const int GONEDEPRECATED
Use gone instead
Implementation
dart
@Deprecated("Use gone instead")
static const int GONE = gone;gone ​
const int goneImplementation
dart
static const int gone = 410;deprecated HTTP_VERSION_NOT_SUPPORTED ​
const int HTTP_VERSION_NOT_SUPPORTEDDEPRECATED
Use httpVersionNotSupported instead
Implementation
dart
@Deprecated("Use httpVersionNotSupported instead")
static const int HTTP_VERSION_NOT_SUPPORTED = httpVersionNotSupported;httpVersionNotSupported ​
const int httpVersionNotSupportedImplementation
dart
static const int httpVersionNotSupported = 505;imUsed ​
const int imUsedImplementation
dart
static const int imUsed = 226;insufficientStorage ​
const int insufficientStorageImplementation
dart
static const int insufficientStorage = 507;deprecated INTERNAL_SERVER_ERROR ​
const int INTERNAL_SERVER_ERRORDEPRECATED
Use internalServerError instead
Implementation
dart
@Deprecated("Use internalServerError instead")
static const int INTERNAL_SERVER_ERROR = internalServerError;internalServerError ​
const int internalServerErrorImplementation
dart
static const int internalServerError = 500;deprecated LENGTH_REQUIRED ​
const int LENGTH_REQUIREDDEPRECATED
Use lengthRequired instead
Implementation
dart
@Deprecated("Use lengthRequired instead")
static const int LENGTH_REQUIRED = lengthRequired;lengthRequired ​
const int lengthRequiredImplementation
dart
static const int lengthRequired = 411;locked ​
const int lockedImplementation
dart
static const int locked = 423;loopDetected ​
const int loopDetectedImplementation
dart
static const int loopDetected = 508;deprecated METHOD_NOT_ALLOWED ​
const int METHOD_NOT_ALLOWEDDEPRECATED
Use methodNotAllowed instead
Implementation
dart
@Deprecated("Use methodNotAllowed instead")
static const int METHOD_NOT_ALLOWED = methodNotAllowed;methodNotAllowed ​
const int methodNotAllowedImplementation
dart
static const int methodNotAllowed = 405;misdirectedRequest ​
const int misdirectedRequestImplementation
dart
static const int misdirectedRequest = 421;deprecated MOVED_PERMANENTLY ​
const int MOVED_PERMANENTLYDEPRECATED
Use movedPermanently instead
Implementation
dart
@Deprecated("Use movedPermanently instead")
static const int MOVED_PERMANENTLY = movedPermanently;deprecated MOVED_TEMPORARILY ​
const int MOVED_TEMPORARILYDEPRECATED
Use movedTemporarily instead
Implementation
dart
@Deprecated("Use movedTemporarily instead")
static const int MOVED_TEMPORARILY = movedTemporarily;movedPermanently ​
const int movedPermanentlyImplementation
dart
static const int movedPermanently = 301;movedTemporarily ​
const int movedTemporarilyImplementation
dart
static const int movedTemporarily = 302;deprecated MULTIPLE_CHOICES ​
const int MULTIPLE_CHOICESDEPRECATED
Use multipleChoices instead
Implementation
dart
@Deprecated("Use multipleChoices instead")
static const int MULTIPLE_CHOICES = multipleChoices;multipleChoices ​
const int multipleChoicesImplementation
dart
static const int multipleChoices = 300;multiStatus ​
const int multiStatusImplementation
dart
static const int multiStatus = 207;deprecated NETWORK_CONNECT_TIMEOUT_ERROR ​
const int NETWORK_CONNECT_TIMEOUT_ERRORDEPRECATED
Use networkConnectTimeoutError instead
Implementation
dart
@Deprecated("Use networkConnectTimeoutError instead")
static const int NETWORK_CONNECT_TIMEOUT_ERROR = networkConnectTimeoutError;networkAuthenticationRequired ​
const int networkAuthenticationRequiredImplementation
dart
static const int networkAuthenticationRequired = 511;networkConnectTimeoutError ​
const int networkConnectTimeoutErrorImplementation
dart
static const int networkConnectTimeoutError = 599;deprecated NO_CONTENT ​
const int NO_CONTENTDEPRECATED
Use noContent instead
Implementation
dart
@Deprecated("Use noContent instead")
static const int NO_CONTENT = noContent;noContent ​
const int noContentImplementation
dart
static const int noContent = 204;deprecated NON_AUTHORITATIVE_INFORMATION ​
const int NON_AUTHORITATIVE_INFORMATIONDEPRECATED
Use nonAuthoritativeInformation instead
Implementation
dart
@Deprecated("Use nonAuthoritativeInformation instead")
static const int NON_AUTHORITATIVE_INFORMATION = nonAuthoritativeInformation;nonAuthoritativeInformation ​
const int nonAuthoritativeInformationImplementation
dart
static const int nonAuthoritativeInformation = 203;deprecated NOT_ACCEPTABLE ​
const int NOT_ACCEPTABLEDEPRECATED
Use notAcceptable instead
Implementation
dart
@Deprecated("Use notAcceptable instead")
static const int NOT_ACCEPTABLE = notAcceptable;deprecated NOT_FOUND ​
const int NOT_FOUNDDEPRECATED
Use notFound instead
Implementation
dart
@Deprecated("Use notFound instead")
static const int NOT_FOUND = notFound;deprecated NOT_IMPLEMENTED ​
const int NOT_IMPLEMENTEDDEPRECATED
Use notImplemented instead
Implementation
dart
@Deprecated("Use notImplemented instead")
static const int NOT_IMPLEMENTED = notImplemented;deprecated NOT_MODIFIED ​
const int NOT_MODIFIEDDEPRECATED
Use notModified instead
Implementation
dart
@Deprecated("Use notModified instead")
static const int NOT_MODIFIED = notModified;notAcceptable ​
const int notAcceptableImplementation
dart
static const int notAcceptable = 406;notExtended ​
const int notExtendedImplementation
dart
static const int notExtended = 510;notFound ​
const int notFoundImplementation
dart
static const int notFound = 404;notImplemented ​
const int notImplementedImplementation
dart
static const int notImplemented = 501;notModified ​
const int notModifiedImplementation
dart
static const int notModified = 304;deprecated OK ​
const int OKDEPRECATED
Use ok instead
Implementation
dart
@Deprecated("Use ok instead")
static const int OK = ok;ok ​
const int okImplementation
dart
static const int ok = 200;deprecated PARTIAL_CONTENT ​
const int PARTIAL_CONTENTDEPRECATED
Use partialContent instead
Implementation
dart
@Deprecated("Use partialContent instead")
static const int PARTIAL_CONTENT = partialContent;partialContent ​
const int partialContentImplementation
dart
static const int partialContent = 206;deprecated PAYMENT_REQUIRED ​
const int PAYMENT_REQUIREDDEPRECATED
Use paymentRequired instead
Implementation
dart
@Deprecated("Use paymentRequired instead")
static const int PAYMENT_REQUIRED = paymentRequired;paymentRequired ​
const int paymentRequiredImplementation
dart
static const int paymentRequired = 402;permanentRedirect ​
const int permanentRedirectImplementation
dart
static const int permanentRedirect = 308;deprecated PRECONDITION_FAILED ​
const int PRECONDITION_FAILEDDEPRECATED
Use preconditionFailed instead
Implementation
dart
@Deprecated("Use preconditionFailed instead")
static const int PRECONDITION_FAILED = preconditionFailed;preconditionFailed ​
const int preconditionFailedImplementation
dart
static const int preconditionFailed = 412;preconditionRequired ​
const int preconditionRequiredImplementation
dart
static const int preconditionRequired = 428;processing ​
const int processingImplementation
dart
static const int processing = 102;deprecated PROXY_AUTHENTICATION_REQUIRED ​
const int PROXY_AUTHENTICATION_REQUIREDDEPRECATED
Use proxyAuthenticationRequired instead
Implementation
dart
@Deprecated("Use proxyAuthenticationRequired instead")
static const int PROXY_AUTHENTICATION_REQUIRED = proxyAuthenticationRequired;proxyAuthenticationRequired ​
const int proxyAuthenticationRequiredImplementation
dart
static const int proxyAuthenticationRequired = 407;deprecated REQUEST_ENTITY_TOO_LARGE ​
const int REQUEST_ENTITY_TOO_LARGEDEPRECATED
Use requestEntityTooLarge instead
Implementation
dart
@Deprecated("Use requestEntityTooLarge instead")
static const int REQUEST_ENTITY_TOO_LARGE = requestEntityTooLarge;deprecated REQUEST_TIMEOUT ​
const int REQUEST_TIMEOUTDEPRECATED
Use requestTimeout instead
Implementation
dart
@Deprecated("Use requestTimeout instead")
static const int REQUEST_TIMEOUT = requestTimeout;deprecated REQUEST_URI_TOO_LONG ​
const int REQUEST_URI_TOO_LONGDEPRECATED
Use requestUriTooLong instead
Implementation
dart
@Deprecated("Use requestUriTooLong instead")
static const int REQUEST_URI_TOO_LONG = requestUriTooLong;deprecated REQUESTED_RANGE_NOT_SATISFIABLE ​
const int REQUESTED_RANGE_NOT_SATISFIABLEDEPRECATED
Use requestedRangeNotSatisfiable instead
Implementation
dart
@Deprecated("Use requestedRangeNotSatisfiable instead")
static const int REQUESTED_RANGE_NOT_SATISFIABLE =
requestedRangeNotSatisfiable;requestedRangeNotSatisfiable ​
const int requestedRangeNotSatisfiableImplementation
dart
static const int requestedRangeNotSatisfiable = 416;requestEntityTooLarge ​
const int requestEntityTooLargeImplementation
dart
static const int requestEntityTooLarge = 413;requestHeaderFieldsTooLarge ​
const int requestHeaderFieldsTooLargeImplementation
dart
static const int requestHeaderFieldsTooLarge = 431;requestTimeout ​
const int requestTimeoutImplementation
dart
static const int requestTimeout = 408;requestUriTooLong ​
const int requestUriTooLongImplementation
dart
static const int requestUriTooLong = 414;deprecated RESET_CONTENT ​
const int RESET_CONTENTDEPRECATED
Use resetContent instead
Implementation
dart
@Deprecated("Use resetContent instead")
static const int RESET_CONTENT = resetContent;resetContent ​
const int resetContentImplementation
dart
static const int resetContent = 205;deprecated SEE_OTHER ​
const int SEE_OTHERDEPRECATED
Use seeOther instead
Implementation
dart
@Deprecated("Use seeOther instead")
static const int SEE_OTHER = seeOther;seeOther ​
const int seeOtherImplementation
dart
static const int seeOther = 303;deprecated SERVICE_UNAVAILABLE ​
const int SERVICE_UNAVAILABLEDEPRECATED
Use serviceUnavailable instead
Implementation
dart
@Deprecated("Use serviceUnavailable instead")
static const int SERVICE_UNAVAILABLE = serviceUnavailable;serviceUnavailable ​
const int serviceUnavailableImplementation
dart
static const int serviceUnavailable = 503;deprecated SWITCHING_PROTOCOLS ​
const int SWITCHING_PROTOCOLSDEPRECATED
Use switchingProtocols instead
Implementation
dart
@Deprecated("Use switchingProtocols instead")
static const int SWITCHING_PROTOCOLS = switchingProtocols;switchingProtocols ​
const int switchingProtocolsImplementation
dart
static const int switchingProtocols = 101;deprecated TEMPORARY_REDIRECT ​
const int TEMPORARY_REDIRECTDEPRECATED
Use temporaryRedirect instead
Implementation
dart
@Deprecated("Use temporaryRedirect instead")
static const int TEMPORARY_REDIRECT = temporaryRedirect;temporaryRedirect ​
const int temporaryRedirectImplementation
dart
static const int temporaryRedirect = 307;tooManyRequests ​
const int tooManyRequestsImplementation
dart
static const int tooManyRequests = 429;deprecated UNAUTHORIZED ​
const int UNAUTHORIZEDDEPRECATED
Use unauthorized instead
Implementation
dart
@Deprecated("Use unauthorized instead")
static const int UNAUTHORIZED = unauthorized;unauthorized ​
const int unauthorizedImplementation
dart
static const int unauthorized = 401;unavailableForLegalReasons ​
const int unavailableForLegalReasonsImplementation
dart
static const int unavailableForLegalReasons = 451;unprocessableEntity ​
const int unprocessableEntityImplementation
dart
static const int unprocessableEntity = 422;deprecated UNSUPPORTED_MEDIA_TYPE ​
const int UNSUPPORTED_MEDIA_TYPEDEPRECATED
Use unsupportedMediaType instead
Implementation
dart
@Deprecated("Use unsupportedMediaType instead")
static const int UNSUPPORTED_MEDIA_TYPE = unsupportedMediaType;unsupportedMediaType ​
const int unsupportedMediaTypeImplementation
dart
static const int unsupportedMediaType = 415;deprecated UPGRADE_REQUIRED ​
const int UPGRADE_REQUIREDDEPRECATED
Use upgradeRequired instead
Implementation
dart
@Deprecated("Use upgradeRequired instead")
static const int UPGRADE_REQUIRED = upgradeRequired;upgradeRequired ​
const int upgradeRequiredImplementation
dart
static const int upgradeRequired = 426;deprecated USE_PROXY ​
const int USE_PROXYDEPRECATED
Use useProxy instead
Implementation
dart
@Deprecated("Use useProxy instead")
static const int USE_PROXY = useProxy;useProxy ​
const int useProxyImplementation
dart
static const int useProxy = 305;variantAlsoNegotiates ​
const int variantAlsoNegotiatesImplementation
dart
static const int variantAlsoNegotiates = 506;