Skip to content

Commit

Permalink
Add optional body parameter to Request constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Nov 1, 2019
1 parent 42dd414 commit dbbf2a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ private static function clone($value)
*
* @param string|UriInterface $uri
* @param string $method
* @param string $body
*/
public function __construct($uri, string $method = "GET")
public function __construct($uri, string $method = "GET", ?string $body = null)
{
$this->setUri($uri);
$this->setMethod($method);
$this->setBody('');
$this->setBody($body);
}

/**
Expand Down

0 comments on commit dbbf2a7

Please sign in to comment.