From a7abb459c91156e0326018bbd7274c9a425e1087 Mon Sep 17 00:00:00 2001 From: mhilbrunner Date: Sun, 10 Dec 2017 23:18:44 +0100 Subject: HTTPClient: Add PATCH method and missing HTTP status codes --- core/io/http_client.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'core/io/http_client.h') diff --git a/core/io/http_client.h b/core/io/http_client.h index db5dd115bd..2e0a345f1c 100644 --- a/core/io/http_client.h +++ b/core/io/http_client.h @@ -56,6 +56,7 @@ public: RESPONSE_RESET_CONTENT = 205, RESPONSE_PARTIAL_CONTENT = 206, RESPONSE_MULTI_STATUS = 207, + RESPONSE_ALREADY_REPORTED = 208, RESPONSE_IM_USED = 226, // 3xx redirection @@ -65,7 +66,9 @@ public: RESPONSE_SEE_OTHER = 303, RESPONSE_NOT_MODIFIED = 304, RESPONSE_USE_PROXY = 305, + RESPONSE_SWITCH_PROXY = 306, RESPONSE_TEMPORARY_REDIRECT = 307, + RESPONSE_PERMANENT_REDIRECT = 308, // 4xx client error RESPONSE_BAD_REQUEST = 400, @@ -86,10 +89,16 @@ public: RESPONSE_UNSUPPORTED_MEDIA_TYPE = 415, RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE = 416, RESPONSE_EXPECTATION_FAILED = 417, + RESPONSE_IM_A_TEAPOT = 418, + RESPONSE_MISDIRECTED_REQUEST = 421, RESPONSE_UNPROCESSABLE_ENTITY = 422, RESPONSE_LOCKED = 423, RESPONSE_FAILED_DEPENDENCY = 424, RESPONSE_UPGRADE_REQUIRED = 426, + RESPONSE_PRECONDITION_REQUIRED = 428, + RESPONSE_TOO_MANY_REQUESTS = 429, + RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE = 431, + RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS = 451, // 5xx server error RESPONSE_INTERNAL_SERVER_ERROR = 500, @@ -98,8 +107,11 @@ public: RESPONSE_SERVICE_UNAVAILABLE = 503, RESPONSE_GATEWAY_TIMEOUT = 504, RESPONSE_HTTP_VERSION_NOT_SUPPORTED = 505, + RESPONSE_VARIANT_ALSO_NEGOTIATES = 506, RESPONSE_INSUFFICIENT_STORAGE = 507, + RESPONSE_LOOP_DETECTED = 508, RESPONSE_NOT_EXTENDED = 510, + RESPONSE_NETWORK_AUTH_REQUIRED = 511, }; @@ -113,10 +125,13 @@ public: METHOD_OPTIONS, METHOD_TRACE, METHOD_CONNECT, + METHOD_PATCH, METHOD_MAX + }; enum Status { + STATUS_DISCONNECTED, STATUS_RESOLVING, //resolving hostname (if passed a hostname) STATUS_CANT_RESOLVE, -- cgit v1.2.3