1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="HTTPClient" inherits="Reference" category="Core" version="3.1">
<brief_description>
Hyper-text transfer protocol client.
</brief_description>
<description>
Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases.
Note that this client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
A [code]HTTPClient[/code] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/networking/http_client_class.html
http://docs.godotengine.org/en/3.0/tutorials/networking/ssl_certificates.html
</tutorials>
<demos>
</demos>
<methods>
<method name="close">
<return type="void">
</return>
<description>
Closes the current connection, allowing reuse of this [code]HTTPClient[/code].
</description>
</method>
<method name="connect_to_host">
<return type="int" enum="Error">
</return>
<argument index="0" name="host" type="String">
</argument>
<argument index="1" name="port" type="int" default="-1">
</argument>
<argument index="2" name="use_ssl" type="bool" default="false">
</argument>
<argument index="3" name="verify_host" type="bool" default="true">
</argument>
<description>
Connect to a host. This needs to be done before any requests are sent.
The host should not have http:// prepended but will strip the protocol identifier if provided.
If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled).
[code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code].
</description>
</method>
<method name="get_response_body_length" qualifiers="const">
<return type="int">
</return>
<description>
Returns the response's body length.
</description>
</method>
<method name="get_response_code" qualifiers="const">
<return type="int">
</return>
<description>
Returns the response's HTTP status code.
</description>
</method>
<method name="get_response_headers">
<return type="PoolStringArray">
</return>
<description>
Returns the response headers.
</description>
</method>
<method name="get_response_headers_as_dictionary">
<return type="Dictionary">
</return>
<description>
Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.
Structure: ("key":"value1; value2")
Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</description>
</method>
<method name="get_status" qualifiers="const">
<return type="int" enum="HTTPClient.Status">
</return>
<description>
Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates.
</description>
</method>
<method name="has_response" qualifiers="const">
<return type="bool">
</return>
<description>
If [code]true[/code] this [code]HTTPClient[/code] has a response available.
</description>
</method>
<method name="is_response_chunked" qualifiers="const">
<return type="bool">
</return>
<description>
If [code]true[/code] this [code]HTTPClient[/code] has a response that is chunked.
</description>
</method>
<method name="poll">
<return type="int" enum="Error">
</return>
<description>
This needs to be called in order to have any request processed. Check results with [method get_status]
</description>
</method>
<method name="query_string_from_dict">
<return type="String">
</return>
<argument index="0" name="fields" type="Dictionary">
</argument>
<description>
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
[codeblock]
var fields = {"username": "user", "password": "pass"}
String queryString = httpClient.query_string_from_dict(fields)
returns:= "username=user&password=pass"
[/codeblock]
</description>
</method>
<method name="read_response_body_chunk">
<return type="PoolByteArray">
</return>
<description>
Reads one chunk from the response.
</description>
</method>
<method name="request">
<return type="int" enum="Error">
</return>
<argument index="0" name="method" type="int" enum="HTTPClient.Method">
</argument>
<argument index="1" name="url" type="String">
</argument>
<argument index="2" name="headers" type="PoolStringArray">
</argument>
<argument index="3" name="body" type="String" default="""">
</argument>
<description>
Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
To create a POST request with query strings to push to the server, do:
[codeblock]
var fields = {"username" : "user", "password" : "pass"}
var queryString = httpClient.query_string_from_dict(fields)
var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
[/codeblock]
</description>
</method>
<method name="request_raw">
<return type="int" enum="Error">
</return>
<argument index="0" name="method" type="int" enum="HTTPClient.Method">
</argument>
<argument index="1" name="url" type="String">
</argument>
<argument index="2" name="headers" type="PoolStringArray">
</argument>
<argument index="3" name="body" type="PoolByteArray">
</argument>
<description>
Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code].
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
<method name="set_read_chunk_size">
<return type="void">
</return>
<argument index="0" name="bytes" type="int">
</argument>
<description>
Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
</description>
</method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled">
If [code]true[/code], execution will block until all data is read from the response.
</member>
<member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection">
The connection to use for this client.
</member>
</members>
<constants>
<constant name="METHOD_GET" value="0" enum="Method">
HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
</constant>
<constant name="METHOD_HEAD" value="1" enum="Method">
HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists.
</constant>
<constant name="METHOD_POST" value="2" enum="Method">
HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files.
</constant>
<constant name="METHOD_PUT" value="3" enum="Method">
HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of [code]POST[/code] as "create or update" and [code]PUT[/code] as "update", although many services tend to not make a clear distinction or change their meaning).
</constant>
<constant name="METHOD_DELETE" value="4" enum="Method">
HTTP DELETE method. The DELETE method requests to delete the specified resource.
</constant>
<constant name="METHOD_OPTIONS" value="5" enum="Method">
HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used.
</constant>
<constant name="METHOD_TRACE" value="6" enum="Method">
HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used.
</constant>
<constant name="METHOD_CONNECT" value="7" enum="Method">
HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used.
</constant>
<constant name="METHOD_PATCH" value="8" enum="Method">
HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource.
</constant>
<constant name="METHOD_MAX" value="9" enum="Method">
Marker for end of [code]METHOD_*[/code] enum. Not used.
</constant>
<constant name="STATUS_DISCONNECTED" value="0" enum="Status">
Status: Disconnected from the server.
</constant>
<constant name="STATUS_RESOLVING" value="1" enum="Status">
Status: Currently resolving the hostname for the given URL into an IP.
</constant>
<constant name="STATUS_CANT_RESOLVE" value="2" enum="Status">
Status: DNS failure: Can't resolve the hostname for the given URL.
</constant>
<constant name="STATUS_CONNECTING" value="3" enum="Status">
Status: Currently connecting to server.
</constant>
<constant name="STATUS_CANT_CONNECT" value="4" enum="Status">
Status: Can't connect to the server.
</constant>
<constant name="STATUS_CONNECTED" value="5" enum="Status">
Status: Connection established.
</constant>
<constant name="STATUS_REQUESTING" value="6" enum="Status">
Status: Currently sending request.
</constant>
<constant name="STATUS_BODY" value="7" enum="Status">
Status: HTTP body received.
</constant>
<constant name="STATUS_CONNECTION_ERROR" value="8" enum="Status">
Status: Error in HTTP connection.
</constant>
<constant name="STATUS_SSL_HANDSHAKE_ERROR" value="9" enum="Status">
Status: Error in SSL handshake.
</constant>
<constant name="RESPONSE_CONTINUE" value="100" enum="ResponseCode">
HTTP status code [code]100 Continue[/code]. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished).
</constant>
<constant name="RESPONSE_SWITCHING_PROTOCOLS" value="101" enum="ResponseCode">
HTTP status code [code]101 Switching Protocol[/code]. Sent in response to an [code]Upgrade[/code] request header by the client. Indicates the protocol the server is switching to.
</constant>
<constant name="RESPONSE_PROCESSING" value="102" enum="ResponseCode">
HTTP status code [code]102 Processing[/code] (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet.
</constant>
<constant name="RESPONSE_OK" value="200" enum="ResponseCode">
HTTP status code [code]200 OK[/code]. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server.
</constant>
<constant name="RESPONSE_CREATED" value="201" enum="ResponseCode">
HTTP status code [code]201 Created[/code]. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
</constant>
<constant name="RESPONSE_ACCEPTED" value="202" enum="ResponseCode">
HTTP status code [code]202 Accepted[/code]. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.
</constant>
<constant name="RESPONSE_NON_AUTHORITATIVE_INFORMATION" value="203" enum="ResponseCode">
HTTP status code [code]203 Non-Authoritative Information[/code]. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.
</constant>
<constant name="RESPONSE_NO_CONTENT" value="204" enum="ResponseCode">
HTTP status code [code]204 No Content[/code]. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.
</constant>
<constant name="RESPONSE_RESET_CONTENT" value="205" enum="ResponseCode">
HTTP status code [code]205 Reset Content[/code]. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server.
</constant>
<constant name="RESPONSE_PARTIAL_CONTENT" value="206" enum="ResponseCode">
HTTP status code [code]206 Partial Content[/code]. This response code is used because of a range header sent by the client to separate download into multiple streams.
</constant>
<constant name="RESPONSE_MULTI_STATUS" value="207" enum="ResponseCode">
HTTP status code [code]207 Multi-Status[/code] (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
</constant>
<constant name="RESPONSE_ALREADY_REPORTED" value="208" enum="ResponseCode">
HTTP status code [code]208 Already Reported[/code] (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
</constant>
<constant name="RESPONSE_IM_USED" value="226" enum="ResponseCode">
HTTP status code [code]226 IM Used[/code] (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
</constant>
<constant name="RESPONSE_MULTIPLE_CHOICES" value="300" enum="ResponseCode">
HTTP status code [code]300 Multiple Choice[/code]. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them.
</constant>
<constant name="RESPONSE_MOVED_PERMANENTLY" value="301" enum="ResponseCode">
HTTP status code [code]301 Moved Permanently[/code]. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response.
</constant>
<constant name="RESPONSE_FOUND" value="302" enum="ResponseCode">
HTTP status code [code]302 Found[/code]. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.
</constant>
<constant name="RESPONSE_SEE_OTHER" value="303" enum="ResponseCode">
HTTP status code [code]303 See Other[/code]. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request.
</constant>
<constant name="RESPONSE_NOT_MODIFIED" value="304" enum="ResponseCode">
HTTP status code [code]304 Not Modified[/code]. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to false.
</constant>
<constant name="RESPONSE_USE_PROXY" value="305" enum="ResponseCode">
HTTP status code [code]305 Use Proxy[/code]. Deprecated. Do not use.
</constant>
<constant name="RESPONSE_SWITCH_PROXY" value="306" enum="ResponseCode">
HTTP status code [code]306 Switch Proxy[/code]. Deprecated. Do not use.
</constant>
<constant name="RESPONSE_TEMPORARY_REDIRECT" value="307" enum="ResponseCode">
HTTP status code [code]307 Temporary Redirect[/code]. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.
</constant>
<constant name="RESPONSE_PERMANENT_REDIRECT" value="308" enum="ResponseCode">
HTTP status code [code]308 Permanent Redirect[/code]. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
</constant>
<constant name="RESPONSE_BAD_REQUEST" value="400" enum="ResponseCode">
HTTP status code [code]400 Bad Request[/code]. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing).
</constant>
<constant name="RESPONSE_UNAUTHORIZED" value="401" enum="ResponseCode">
HTTP status code [code]401 Unauthorized[/code]. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource.
</constant>
<constant name="RESPONSE_PAYMENT_REQUIRED" value="402" enum="ResponseCode">
HTTP status code [code]402 Payment Required[/code]. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used.
</constant>
<constant name="RESPONSE_FORBIDDEN" value="403" enum="ResponseCode">
HTTP status code [code]403 Forbidden[/code]. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike [code]401[/code], the client's identity is known to the server.
</constant>
<constant name="RESPONSE_NOT_FOUND" value="404" enum="ResponseCode">
HTTP status code [code]404 Not Found[/code]. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized.
</constant>
<constant name="RESPONSE_METHOD_NOT_ALLOWED" value="405" enum="ResponseCode">
HTTP status code [code]405 Method Not Allowed[/code]. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.
</constant>
<constant name="RESPONSE_NOT_ACCEPTABLE" value="406" enum="ResponseCode">
HTTP status code [code]406 Not Acceptable[/code]. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content.
</constant>
<constant name="RESPONSE_PROXY_AUTHENTICATION_REQUIRED" value="407" enum="ResponseCode">
HTTP status code [code]407 Proxy Authentication Required[/code]. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy.
</constant>
<constant name="RESPONSE_REQUEST_TIMEOUT" value="408" enum="ResponseCode">
HTTP status code [code]408 Request Timeout[/code]. The server did not receive a complete request message within the time that it was prepared to wait.
</constant>
<constant name="RESPONSE_CONFLICT" value="409" enum="ResponseCode">
HTTP status code [code]409 Conflict[/code]. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request.
</constant>
<constant name="RESPONSE_GONE" value="410" enum="ResponseCode">
HTTP status code [code]410 Gone[/code]. The target resource is no longer available at the origin server and this condition is likely permanent.
</constant>
<constant name="RESPONSE_LENGTH_REQUIRED" value="411" enum="ResponseCode">
HTTP status code [code]411 Length Required[/code]. The server refuses to accept the request without a defined Content-Length header.
</constant>
<constant name="RESPONSE_PRECONDITION_FAILED" value="412" enum="ResponseCode">
HTTP status code [code]412 Precondition Failed[/code]. One or more conditions given in the request header fields evaluated to false when tested on the server.
</constant>
<constant name="RESPONSE_REQUEST_ENTITY_TOO_LARGE" value="413" enum="ResponseCode">
HTTP status code [code]413 Entity Too Large[/code]. The server is refusing to process a request because the request payload is larger than the server is willing or able to process.
</constant>
<constant name="RESPONSE_REQUEST_URI_TOO_LONG" value="414" enum="ResponseCode">
HTTP status code [code]414 Request-URI Too Long[/code]. The server is refusing to service the request because the request-target is longer than the server is willing to interpret.
</constant>
<constant name="RESPONSE_UNSUPPORTED_MEDIA_TYPE" value="415" enum="ResponseCode">
HTTP status code [code]415 Unsupported Media Type[/code]. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.
</constant>
<constant name="RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE" value="416" enum="ResponseCode">
HTTP status code [code]416 Requested Range Not Satisfiable[/code]. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.
</constant>
<constant name="RESPONSE_EXPECTATION_FAILED" value="417" enum="ResponseCode">
HTTP status code [code]417 Expectation Failed[/code]. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
</constant>
<constant name="RESPONSE_IM_A_TEAPOT" value="418" enum="ResponseCode">
HTTP status code [code]418 I'm A Teapot[/code]. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
</constant>
<constant name="RESPONSE_MISDIRECTED_REQUEST" value="421" enum="ResponseCode">
HTTP status code [code]421 Misdirected Request[/code]. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.
</constant>
<constant name="RESPONSE_UNPROCESSABLE_ENTITY" value="422" enum="ResponseCode">
HTTP status code [code]422 Unprocessable Entity[/code] (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions.
</constant>
<constant name="RESPONSE_LOCKED" value="423" enum="ResponseCode">
HTTP status code [code]423 Locked[/code] (WebDAV). The source or destination resource of a method is locked.
</constant>
<constant name="RESPONSE_FAILED_DEPENDENCY" value="424" enum="ResponseCode">
HTTP status code [code]424 Failed Dependency[/code] (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed.
</constant>
<constant name="RESPONSE_UPGRADE_REQUIRED" value="426" enum="ResponseCode">
HTTP status code [code]426 Upgrade Required[/code]. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
</constant>
<constant name="RESPONSE_PRECONDITION_REQUIRED" value="428" enum="ResponseCode">
HTTP status code [code]428 Precondition Required[/code]. The origin server requires the request to be conditional.
</constant>
<constant name="RESPONSE_TOO_MANY_REQUESTS" value="429" enum="ResponseCode">
HTTP status code [code]429 Too Many Requests[/code]. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later.
</constant>
<constant name="RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE" value="431" enum="ResponseCode">
HTTP status code [code]431 Request Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
</constant>
<constant name="RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS" value="451" enum="ResponseCode">
HTTP status code [code]451 Response Unavailable For Legal Reasons[/code]. The server is denying access to the resource as a consequence of a legal demand.
</constant>
<constant name="RESPONSE_INTERNAL_SERVER_ERROR" value="500" enum="ResponseCode">
HTTP status code [code]500 Internal Server Error[/code]. The server encountered an unexpected condition that prevented it from fulfilling the request.
</constant>
<constant name="RESPONSE_NOT_IMPLEMENTED" value="501" enum="ResponseCode">
HTTP status code [code]501 Not Implemented[/code]. The server does not support the functionality required to fulfill the request.
</constant>
<constant name="RESPONSE_BAD_GATEWAY" value="502" enum="ResponseCode">
HTTP status code [code]502 Bad Gateway[/code]. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies.
</constant>
<constant name="RESPONSE_SERVICE_UNAVAILABLE" value="503" enum="ResponseCode">
HTTP status code [code]503 Service Unavailable[/code]. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later.
</constant>
<constant name="RESPONSE_GATEWAY_TIMEOUT" value="504" enum="ResponseCode">
HTTP status code [code]504 Gateway Timeout[/code]. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies.
</constant>
<constant name="RESPONSE_HTTP_VERSION_NOT_SUPPORTED" value="505" enum="ResponseCode">
HTTP status code [code]505 HTTP Version Not Supported[/code]. The server does not support, or refuses to support, the major version of HTTP that was used in the request message.
</constant>
<constant name="RESPONSE_VARIANT_ALSO_NEGOTIATES" value="506" enum="ResponseCode">
HTTP status code [code]506 Variant Also Negotiates[/code]. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
</constant>
<constant name="RESPONSE_INSUFFICIENT_STORAGE" value="507" enum="ResponseCode">
HTTP status code [code]507 Insufficient Storage[/code]. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
</constant>
<constant name="RESPONSE_LOOP_DETECTED" value="508" enum="ResponseCode">
HTTP status code [code]508 Loop Detected[/code]. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed.
</constant>
<constant name="RESPONSE_NOT_EXTENDED" value="510" enum="ResponseCode">
HTTP status code [code]510 Not Extended[/code]. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request.
</constant>
<constant name="RESPONSE_NETWORK_AUTH_REQUIRED" value="511" enum="ResponseCode">
HTTP status code [code]511 Network Authentication Required[/code]. The client needs to authenticate to gain network access.
</constant>
</constants>
</class>
|