Skip to content

Commit

Permalink
Handle HTTP PATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-k authored Jul 12, 2022
1 parent 2407937 commit a574db9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a574db9

Please sign in to comment.