Skip to content

Commit

Permalink
Merge pull request #4 from php-fig/patch-1
Browse files Browse the repository at this point in the history
Some cleanup and added PSR7 as requirement
  • Loading branch information
sagikazarmark authored Feb 3, 2018
2 parents c6e0589 + 678abfb commit d4d3ec0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
],
"require": {
"php": "^7.0"
"php": "^7.0",
"psr/http-message": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface ClientInterface
/**
* Sends a PSR-7 request and returns a PSR-7 response.
*
* Every technically correct HTTP response MUST be returned as is, even if it represents an HTTP
* Every technically correct HTTP response MUST be returned as is, even if it represents a HTTP
* error response or a redirect instruction. The only special case is 1xx responses, which MUST
* be assembled in the HTTP client.
*
Expand All @@ -25,7 +25,7 @@ interface ClientInterface
*
* @return ResponseInterface
*
* @throws \Psr\Http\Client\Exception If an error happens during processing the request.
* @throws \Psr\Http\Client\ClientException If an error happens during processing the request.
*/
public function sendRequest(RequestInterface $request): ResponseInterface;
}
6 changes: 3 additions & 3 deletions src/Exception/RequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Psr\Http\Client\Exception;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Client\ClientException;
use Psr\Http\Message\RequestInterface;

/**
* Exception for when a request failed.
*
* Examples:
* - Request is invalid (eg. method is missing)
* - Runtime request errors (like the body stream is not seekable)
* - Request is invalid (e.g. method is missing)
* - Runtime request errors (e.g. the body stream is not seekable)
*/
interface RequestException extends ClientException
{
Expand Down

0 comments on commit d4d3ec0

Please sign in to comment.