1
1
<?php
2
+
2
3
namespace Codeception \Util ;
3
4
4
5
/**
20
21
*/
21
22
class HttpCode
22
23
{
24
+ // const CONTINUE = 100;
23
25
const SWITCHING_PROTOCOLS = 101 ;
24
26
const PROCESSING = 102 ; // RFC2518
27
+ const EARLY_HINTS = 103 ; // RFC8297
25
28
const OK = 200 ;
26
29
const CREATED = 201 ;
27
30
const ACCEPTED = 202 ;
@@ -60,6 +63,7 @@ class HttpCode
60
63
const REQUESTED_RANGE_NOT_SATISFIABLE = 416 ;
61
64
const EXPECTATION_FAILED = 417 ;
62
65
const I_AM_A_TEAPOT = 418 ; // RFC2324
66
+ const MISDIRECTED_REQUEST = 421 ; // RFC7540
63
67
const UNPROCESSABLE_ENTITY = 422 ; // RFC4918
64
68
const LOCKED = 423 ; // RFC4918
65
69
const FAILED_DEPENDENCY = 424 ; // RFC4918
@@ -68,6 +72,7 @@ class HttpCode
68
72
const PRECONDITION_REQUIRED = 428 ; // RFC6585
69
73
const TOO_MANY_REQUESTS = 429 ; // RFC6585
70
74
const REQUEST_HEADER_FIELDS_TOO_LARGE = 431 ; // RFC6585
75
+ const UNAVAILABLE_FOR_LEGAL_REASONS = 451 ;
71
76
const INTERNAL_SERVER_ERROR = 500 ;
72
77
const NOT_IMPLEMENTED = 501 ;
73
78
const BAD_GATEWAY = 502 ;
@@ -83,6 +88,7 @@ class HttpCode
83
88
private static $ codes = [
84
89
100 => 'Continue ' ,
85
90
102 => 'Processing ' ,
91
+ 103 => 'Early Hints ' ,
86
92
200 => 'OK ' ,
87
93
201 => 'Created ' ,
88
94
202 => 'Accepted ' ,
@@ -99,6 +105,7 @@ class HttpCode
99
105
303 => 'See Other ' ,
100
106
304 => 'Not Modified ' ,
101
107
305 => 'Use Proxy ' ,
108
+ 306 => 'Reserved ' ,
102
109
307 => 'Temporary Redirect ' ,
103
110
308 => 'Permanent Redirect ' ,
104
111
400 => 'Bad Request ' ,
@@ -119,14 +126,17 @@ class HttpCode
119
126
415 => 'Unsupported Media Type ' ,
120
127
416 => 'Requested Range Not Satisfiable ' ,
121
128
417 => 'Expectation Failed ' ,
129
+ 418 => 'Unassigned ' ,
122
130
421 => 'Misdirected Request ' ,
123
131
422 => 'Unprocessable Entity ' ,
124
132
423 => 'Locked ' ,
125
133
424 => 'Failed Dependency ' ,
134
+ 425 => 'Too Early ' ,
126
135
426 => 'Upgrade Required ' ,
127
136
428 => 'Precondition Required ' ,
128
137
429 => 'Too Many Requests ' ,
129
138
431 => 'Request Header Fields Too Large ' ,
139
+ 451 => 'Unavailable For Legal Reasons ' ,
130
140
500 => 'Internal Server Error ' ,
131
141
501 => 'Not Implemented ' ,
132
142
502 => 'Bad Gateway ' ,
0 commit comments