Skip to content

Commit

Permalink
Merge pull request #9 from php-fig/patch-2
Browse files Browse the repository at this point in the history
Updated interfaces from specification
  • Loading branch information
sagikazarmark authored Oct 30, 2018
2 parents bf26b2b + 0fd911e commit 496a823
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/ClientExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Psr\Http\Client;

/**
* Every HTTP client related Exception MUST implement this interface.
* Every HTTP client related exception MUST implement this interface.
*/
interface ClientExceptionInterface extends \Throwable
{
}
}
11 changes: 0 additions & 11 deletions src/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ 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
* error response or a redirect instruction. The only special case is 1xx responses, which MUST
* be assembled in the HTTP client.
*
* The client MAY do modifications to the Request before sending it. Because PSR-7 objects are
* immutable, one cannot assume that the object passed to ClientInterface::sendRequest() will be the same
* object that is actually sent. For example, the Request object that is returned by an exception MAY
* be a different object than the one passed to sendRequest, so comparison by reference (===) is not possible.
*
* {@link https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message-meta.md#why-value-objects}
*
* @param RequestInterface $request
*
* @return ResponseInterface
Expand Down
2 changes: 1 addition & 1 deletion src/NetworkExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ interface NetworkExceptionInterface extends ClientExceptionInterface
* @return RequestInterface
*/
public function getRequest(): RequestInterface;
}
}

0 comments on commit 496a823

Please sign in to comment.