Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated interfaces from specification #9

Merged
merged 1 commit into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}