From f4f923ebacb86f547663667d3bb6175614f0651c Mon Sep 17 00:00:00 2001 From: Mychi Darko Date: Wed, 2 Jun 2021 12:18:02 +0000 Subject: [PATCH] :bug: fixed compulsory request options --- src/Fetch.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Fetch.php b/src/Fetch.php index 8f2c48c..9d9a1fc 100644 --- a/src/Fetch.php +++ b/src/Fetch.php @@ -205,7 +205,7 @@ public static function get($url, $config = []) /** * Make a post request */ - public static function post($url, $data, $config) + public static function post($url, $data, $config = []) { return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::POST])); } @@ -213,7 +213,7 @@ public static function post($url, $data, $config) /** * Make a put request */ - public static function put($url, $data, $config) + public static function put($url, $data, $config = []) { return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::PUT])); } @@ -221,7 +221,7 @@ public static function put($url, $data, $config) /** * Make a patch request */ - public static function patch($url, $data, $config) + public static function patch($url, $data, $config = []) { return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::PATCH])); } @@ -229,7 +229,7 @@ public static function patch($url, $data, $config) /** * Make a delete request */ - public static function delete($url, $config) + public static function delete($url, $config = []) { return static::request(array_merge($config, ["url" => $url, "method" => static::DELETE])); } @@ -237,7 +237,7 @@ public static function delete($url, $config) /** * Make an options request */ - public static function options($url, $config) + public static function options($url, $config = []) { return static::request(array_merge($config, ["url" => $url, "method" => static::OPTIONS])); }