Skip to content

Commit

Permalink
fix(network): align HTTP status codes with IANA (#4567)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Jun 11, 2019
1 parent 7922641 commit 6860d73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/NetworkManager.js
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 6860d73

Please sign in to comment.