fix(network): align HTTP status codes with IANA (#4567)

Aline HTTP status texts with https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
This commit is contained in:
Andrey Lushnikov 2019-06-10 21:04:45 -07:00 committed by GitHub
parent 792264122c
commit 6860d73212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,19 +728,22 @@ function headersArray(headers) {
return result;
}
// List taken from https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml with extra 306 and 418 codes.
const STATUS_TEXTS = {
'100': 'Continue',
'101': 'Switching Protocols',
'102': 'Processing',
'103': 'Early Hints',
'200': 'OK',
'201': 'Created',
'202': 'Accepted',
'203': 'Non-Authoritative Information',
'204': 'No Content',
'205': 'Reset Content',
'206': 'Partial Content',
'207': 'Multi-Status',
'208': 'Already Reported',
'209': 'IM Used',
'226': 'IM Used',
'300': 'Multiple Choices',
'301': 'Moved Permanently',
'302': 'Found',
@ -773,6 +776,7 @@ const STATUS_TEXTS = {
'422': 'Unprocessable Entity',
'423': 'Locked',
'424': 'Failed Dependency',
'425': 'Too Early',
'426': 'Upgrade Required',
'428': 'Precondition Required',
'429': 'Too Many Requests',