@@ -16,7 +16,7 @@ import 'dart:collection'
16
16
UnmodifiableMapView;
17
17
import 'dart:convert' ;
18
18
import 'dart:developer' hide log;
19
- import 'dart:_internal' show Since;
19
+ import 'dart:_internal' show Since, HttpStatus ;
20
20
import 'dart:math' ;
21
21
import 'dart:io' ;
22
22
import 'dart:typed_data' ;
@@ -31,184 +31,6 @@ part 'overrides.dart';
31
31
part 'websocket.dart' ;
32
32
part 'websocket_impl.dart' ;
33
33
34
- /**
35
- * HTTP status codes.
36
- */
37
- abstract class HttpStatus {
38
- static const int continue_ = 100 ;
39
- static const int switchingProtocols = 101 ;
40
- @Since ("2.1" )
41
- static const int processing = 102 ;
42
- static const int ok = 200 ;
43
- static const int created = 201 ;
44
- static const int accepted = 202 ;
45
- static const int nonAuthoritativeInformation = 203 ;
46
- static const int noContent = 204 ;
47
- static const int resetContent = 205 ;
48
- static const int partialContent = 206 ;
49
- @Since ("2.1" )
50
- static const int multiStatus = 207 ;
51
- @Since ("2.1" )
52
- static const int alreadyReported = 208 ;
53
- @Since ("2.1" )
54
- static const int imUsed = 226 ;
55
- static const int multipleChoices = 300 ;
56
- static const int movedPermanently = 301 ;
57
- static const int found = 302 ;
58
- static const int movedTemporarily = 302 ; // Common alias for found.
59
- static const int seeOther = 303 ;
60
- static const int notModified = 304 ;
61
- static const int useProxy = 305 ;
62
- static const int temporaryRedirect = 307 ;
63
- @Since ("2.1" )
64
- static const int permanentRedirect = 308 ;
65
- static const int badRequest = 400 ;
66
- static const int unauthorized = 401 ;
67
- static const int paymentRequired = 402 ;
68
- static const int forbidden = 403 ;
69
- static const int notFound = 404 ;
70
- static const int methodNotAllowed = 405 ;
71
- static const int notAcceptable = 406 ;
72
- static const int proxyAuthenticationRequired = 407 ;
73
- static const int requestTimeout = 408 ;
74
- static const int conflict = 409 ;
75
- static const int gone = 410 ;
76
- static const int lengthRequired = 411 ;
77
- static const int preconditionFailed = 412 ;
78
- static const int requestEntityTooLarge = 413 ;
79
- static const int requestUriTooLong = 414 ;
80
- static const int unsupportedMediaType = 415 ;
81
- static const int requestedRangeNotSatisfiable = 416 ;
82
- static const int expectationFailed = 417 ;
83
- @Since ("2.1" )
84
- static const int misdirectedRequest = 421 ;
85
- @Since ("2.1" )
86
- static const int unprocessableEntity = 422 ;
87
- @Since ("2.1" )
88
- static const int locked = 423 ;
89
- @Since ("2.1" )
90
- static const int failedDependency = 424 ;
91
- static const int upgradeRequired = 426 ;
92
- @Since ("2.1" )
93
- static const int preconditionRequired = 428 ;
94
- @Since ("2.1" )
95
- static const int tooManyRequests = 429 ;
96
- @Since ("2.1" )
97
- static const int requestHeaderFieldsTooLarge = 431 ;
98
- @Since ("2.1" )
99
- static const int connectionClosedWithoutResponse = 444 ;
100
- @Since ("2.1" )
101
- static const int unavailableForLegalReasons = 451 ;
102
- @Since ("2.1" )
103
- static const int clientClosedRequest = 499 ;
104
- static const int internalServerError = 500 ;
105
- static const int notImplemented = 501 ;
106
- static const int badGateway = 502 ;
107
- static const int serviceUnavailable = 503 ;
108
- static const int gatewayTimeout = 504 ;
109
- static const int httpVersionNotSupported = 505 ;
110
- @Since ("2.1" )
111
- static const int variantAlsoNegotiates = 506 ;
112
- @Since ("2.1" )
113
- static const int insufficientStorage = 507 ;
114
- @Since ("2.1" )
115
- static const int loopDetected = 508 ;
116
- @Since ("2.1" )
117
- static const int notExtended = 510 ;
118
- @Since ("2.1" )
119
- static const int networkAuthenticationRequired = 511 ;
120
- // Client generated status code.
121
- static const int networkConnectTimeoutError = 599 ;
122
-
123
- @Deprecated ("Use continue_ instead" )
124
- static const int CONTINUE = continue_;
125
- @Deprecated ("Use switchingProtocols instead" )
126
- static const int SWITCHING_PROTOCOLS = switchingProtocols;
127
- @Deprecated ("Use ok instead" )
128
- static const int OK = ok;
129
- @Deprecated ("Use created instead" )
130
- static const int CREATED = created;
131
- @Deprecated ("Use accepted instead" )
132
- static const int ACCEPTED = accepted;
133
- @Deprecated ("Use nonAuthoritativeInformation instead" )
134
- static const int NON_AUTHORITATIVE_INFORMATION = nonAuthoritativeInformation;
135
- @Deprecated ("Use noContent instead" )
136
- static const int NO_CONTENT = noContent;
137
- @Deprecated ("Use resetContent instead" )
138
- static const int RESET_CONTENT = resetContent;
139
- @Deprecated ("Use partialContent instead" )
140
- static const int PARTIAL_CONTENT = partialContent;
141
- @Deprecated ("Use multipleChoices instead" )
142
- static const int MULTIPLE_CHOICES = multipleChoices;
143
- @Deprecated ("Use movedPermanently instead" )
144
- static const int MOVED_PERMANENTLY = movedPermanently;
145
- @Deprecated ("Use found instead" )
146
- static const int FOUND = found;
147
- @Deprecated ("Use movedTemporarily instead" )
148
- static const int MOVED_TEMPORARILY = movedTemporarily;
149
- @Deprecated ("Use seeOther instead" )
150
- static const int SEE_OTHER = seeOther;
151
- @Deprecated ("Use notModified instead" )
152
- static const int NOT_MODIFIED = notModified;
153
- @Deprecated ("Use useProxy instead" )
154
- static const int USE_PROXY = useProxy;
155
- @Deprecated ("Use temporaryRedirect instead" )
156
- static const int TEMPORARY_REDIRECT = temporaryRedirect;
157
- @Deprecated ("Use badRequest instead" )
158
- static const int BAD_REQUEST = badRequest;
159
- @Deprecated ("Use unauthorized instead" )
160
- static const int UNAUTHORIZED = unauthorized;
161
- @Deprecated ("Use paymentRequired instead" )
162
- static const int PAYMENT_REQUIRED = paymentRequired;
163
- @Deprecated ("Use forbidden instead" )
164
- static const int FORBIDDEN = forbidden;
165
- @Deprecated ("Use notFound instead" )
166
- static const int NOT_FOUND = notFound;
167
- @Deprecated ("Use methodNotAllowed instead" )
168
- static const int METHOD_NOT_ALLOWED = methodNotAllowed;
169
- @Deprecated ("Use notAcceptable instead" )
170
- static const int NOT_ACCEPTABLE = notAcceptable;
171
- @Deprecated ("Use proxyAuthenticationRequired instead" )
172
- static const int PROXY_AUTHENTICATION_REQUIRED = proxyAuthenticationRequired;
173
- @Deprecated ("Use requestTimeout instead" )
174
- static const int REQUEST_TIMEOUT = requestTimeout;
175
- @Deprecated ("Use conflict instead" )
176
- static const int CONFLICT = conflict;
177
- @Deprecated ("Use gone instead" )
178
- static const int GONE = gone;
179
- @Deprecated ("Use lengthRequired instead" )
180
- static const int LENGTH_REQUIRED = lengthRequired;
181
- @Deprecated ("Use preconditionFailed instead" )
182
- static const int PRECONDITION_FAILED = preconditionFailed;
183
- @Deprecated ("Use requestEntityTooLarge instead" )
184
- static const int REQUEST_ENTITY_TOO_LARGE = requestEntityTooLarge;
185
- @Deprecated ("Use requestUriTooLong instead" )
186
- static const int REQUEST_URI_TOO_LONG = requestUriTooLong;
187
- @Deprecated ("Use unsupportedMediaType instead" )
188
- static const int UNSUPPORTED_MEDIA_TYPE = unsupportedMediaType;
189
- @Deprecated ("Use requestedRangeNotSatisfiable instead" )
190
- static const int REQUESTED_RANGE_NOT_SATISFIABLE =
191
- requestedRangeNotSatisfiable;
192
- @Deprecated ("Use expectationFailed instead" )
193
- static const int EXPECTATION_FAILED = expectationFailed;
194
- @Deprecated ("Use upgradeRequired instead" )
195
- static const int UPGRADE_REQUIRED = upgradeRequired;
196
- @Deprecated ("Use internalServerError instead" )
197
- static const int INTERNAL_SERVER_ERROR = internalServerError;
198
- @Deprecated ("Use notImplemented instead" )
199
- static const int NOT_IMPLEMENTED = notImplemented;
200
- @Deprecated ("Use badGateway instead" )
201
- static const int BAD_GATEWAY = badGateway;
202
- @Deprecated ("Use serviceUnavailable instead" )
203
- static const int SERVICE_UNAVAILABLE = serviceUnavailable;
204
- @Deprecated ("Use gatewayTimeout instead" )
205
- static const int GATEWAY_TIMEOUT = gatewayTimeout;
206
- @Deprecated ("Use httpVersionNotSupported instead" )
207
- static const int HTTP_VERSION_NOT_SUPPORTED = httpVersionNotSupported;
208
- @Deprecated ("Use networkConnectTimeoutError instead" )
209
- static const int NETWORK_CONNECT_TIMEOUT_ERROR = networkConnectTimeoutError;
210
- }
211
-
212
34
/**
213
35
* A server that delivers content, such as web pages, using the HTTP protocol.
214
36
*
0 commit comments