Skip to content

Commit

Permalink
🐛 fixed compulsory request options
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jun 2, 2021
1 parent 893fc9f commit f4f923e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Fetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,39 +205,39 @@ 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]));
}

/**
* 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]));
}

/**
* 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]));
}

/**
* 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]));
}

/**
* 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]));
}
Expand Down

0 comments on commit f4f923e

Please sign in to comment.