From 25b7d2aab61ae6421398d3abae5da6ffe590333d Mon Sep 17 00:00:00 2001 From: s1n Date: Sat, 28 Mar 2020 10:36:41 -0700 Subject: 3/28/2020, 10:36 --- .../requests/library/Requests/Exception/HTTP.php | 71 ++++++++++++++++++++++ .../library/Requests/Exception/HTTP/304.php | 27 ++++++++ .../library/Requests/Exception/HTTP/305.php | 27 ++++++++ .../library/Requests/Exception/HTTP/306.php | 27 ++++++++ .../library/Requests/Exception/HTTP/400.php | 27 ++++++++ .../library/Requests/Exception/HTTP/401.php | 27 ++++++++ .../library/Requests/Exception/HTTP/402.php | 27 ++++++++ .../library/Requests/Exception/HTTP/403.php | 27 ++++++++ .../library/Requests/Exception/HTTP/404.php | 27 ++++++++ .../library/Requests/Exception/HTTP/405.php | 27 ++++++++ .../library/Requests/Exception/HTTP/406.php | 27 ++++++++ .../library/Requests/Exception/HTTP/407.php | 27 ++++++++ .../library/Requests/Exception/HTTP/408.php | 27 ++++++++ .../library/Requests/Exception/HTTP/409.php | 27 ++++++++ .../library/Requests/Exception/HTTP/410.php | 27 ++++++++ .../library/Requests/Exception/HTTP/411.php | 27 ++++++++ .../library/Requests/Exception/HTTP/412.php | 27 ++++++++ .../library/Requests/Exception/HTTP/413.php | 27 ++++++++ .../library/Requests/Exception/HTTP/414.php | 27 ++++++++ .../library/Requests/Exception/HTTP/415.php | 27 ++++++++ .../library/Requests/Exception/HTTP/416.php | 27 ++++++++ .../library/Requests/Exception/HTTP/417.php | 27 ++++++++ .../library/Requests/Exception/HTTP/418.php | 29 +++++++++ .../library/Requests/Exception/HTTP/428.php | 29 +++++++++ .../library/Requests/Exception/HTTP/429.php | 29 +++++++++ .../library/Requests/Exception/HTTP/431.php | 29 +++++++++ .../library/Requests/Exception/HTTP/500.php | 27 ++++++++ .../library/Requests/Exception/HTTP/501.php | 27 ++++++++ .../library/Requests/Exception/HTTP/502.php | 27 ++++++++ .../library/Requests/Exception/HTTP/503.php | 27 ++++++++ .../library/Requests/Exception/HTTP/504.php | 27 ++++++++ .../library/Requests/Exception/HTTP/505.php | 27 ++++++++ .../library/Requests/Exception/HTTP/511.php | 29 +++++++++ .../library/Requests/Exception/HTTP/Unknown.php | 44 ++++++++++++++ .../library/Requests/Exception/Transport.php | 5 ++ .../library/Requests/Exception/Transport/cURL.php | 56 +++++++++++++++++ 36 files changed, 1050 insertions(+) create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/305.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/306.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/400.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/401.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/402.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/403.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/406.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/407.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/410.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/411.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/415.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/416.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/428.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/429.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/502.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/503.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/504.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/Unknown.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/Transport.php create mode 100644 includes/vendor/rmccue/requests/library/Requests/Exception/Transport/cURL.php (limited to 'includes/vendor/rmccue/requests/library/Requests/Exception') diff --git a/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP.php b/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP.php new file mode 100644 index 0000000..9ac6a87 --- /dev/null +++ b/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP.php @@ -0,0 +1,71 @@ +reason = $reason; + } + + $message = sprintf('%d %s', $this->code, $this->reason); + parent::__construct($message, 'httpresponse', $data, $this->code); + } + + /** + * Get the status message + */ + public function getReason() { + return $this->reason; + } + + /** + * Get the correct exception class for a given error code + * + * @param int|bool $code HTTP status code, or false if unavailable + * @return string Exception class name to use + */ + public static function get_class($code) { + if (!$code) { + return 'Requests_Exception_HTTP_Unknown'; + } + + $class = sprintf('Requests_Exception_HTTP_%d', $code); + if (class_exists($class)) { + return $class; + } + + return 'Requests_Exception_HTTP_Unknown'; + } +} \ No newline at end of file diff --git a/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php b/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php new file mode 100644 index 0000000..6799033 --- /dev/null +++ b/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php @@ -0,0 +1,27 @@ +code = $data->status_code; + } + + parent::__construct($reason, $data); + } +} \ No newline at end of file diff --git a/includes/vendor/rmccue/requests/library/Requests/Exception/Transport.php b/includes/vendor/rmccue/requests/library/Requests/Exception/Transport.php new file mode 100644 index 0000000..e60b488 --- /dev/null +++ b/includes/vendor/rmccue/requests/library/Requests/Exception/Transport.php @@ -0,0 +1,5 @@ +type = $type; + } + + if ($code !== null) { + $this->code = $code; + } + + if ($message !== null) { + $this->reason = $message; + } + + $message = sprintf('%d %s', $this->code, $this->reason); + parent::__construct($message, $this->type, $data, $this->code); + } + + /** + * Get the error message + */ + public function getReason() { + return $this->reason; + } + +} -- cgit v1.2.3