Skip to content

Commit f4f923e

Browse files
committed
🐛 fixed compulsory request options
1 parent 893fc9f commit f4f923e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Fetch.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,39 +205,39 @@ public static function get($url, $config = [])
205205
/**
206206
* Make a post request
207207
*/
208-
public static function post($url, $data, $config)
208+
public static function post($url, $data, $config = [])
209209
{
210210
return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::POST]));
211211
}
212212

213213
/**
214214
* Make a put request
215215
*/
216-
public static function put($url, $data, $config)
216+
public static function put($url, $data, $config = [])
217217
{
218218
return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::PUT]));
219219
}
220220

221221
/**
222222
* Make a patch request
223223
*/
224-
public static function patch($url, $data, $config)
224+
public static function patch($url, $data, $config = [])
225225
{
226226
return static::request(array_merge($config, ["url" => $url, "data" => $data, "method" => static::PATCH]));
227227
}
228228

229229
/**
230230
* Make a delete request
231231
*/
232-
public static function delete($url, $config)
232+
public static function delete($url, $config = [])
233233
{
234234
return static::request(array_merge($config, ["url" => $url, "method" => static::DELETE]));
235235
}
236236

237237
/**
238238
* Make an options request
239239
*/
240-
public static function options($url, $config)
240+
public static function options($url, $config = [])
241241
{
242242
return static::request(array_merge($config, ["url" => $url, "method" => static::OPTIONS]));
243243
}

0 commit comments

Comments
 (0)