From a574db9b66b7b2130d28c7f622d8a62979852d69 Mon Sep 17 00:00:00 2001 From: JRK Date: Tue, 12 Jul 2022 13:00:09 +0200 Subject: [PATCH] Handle HTTP PATCH --- src/Http/Request.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Request.php b/src/Http/Request.php index e66a7e5..e18a8af 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -10,6 +10,7 @@ * @method Response get($type, $target, $options = []) * @method Response post($type, $target, $options = []) * @method Response put($type, $target, $options = []) + * @method Response patch($type, $target, $options = []) * @method Response delete($type, $target, $options = []) */ class Request @@ -143,7 +144,7 @@ public function setToken($token) */ public function __call($name, $args = []) { - if (in_array($name, ['get', 'post', 'put', 'delete'])) { + if (in_array($name, ['get', 'post', 'put', 'patch', 'delete'])) { $options = !empty($args[1]) ? $args[1] : []; // Will pass the function name as the request type. The second argument