Skip to content

Commit

Permalink
Libraries should implement our exceptions (#21)
Browse files Browse the repository at this point in the history
* Libraries should implement our exceptions

* Moved paragraph
  • Loading branch information
Nyholm authored Oct 15, 2016
1 parent 64fffc6 commit 32dba79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions proposed/http-client/http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ This document describes common interfaces for sending HTTP messages.
## Specification

An HTTP client has the responsibility to send a PSR-7 request and return a PSR-7
response. When there is an error during sending the request, network or the response an
response. When there is an error during sending the request or an error with network an
exception should be thrown.

An implementing library MUST implement `Psr\Http\Client\Exception` for each exception it throws.
It SHOULD implement exceptions for `Psr\Http\Client\Exception\NetworkException` and
`Psr\Http\Client\Exception\RequestException`.

## Goal

Expand All @@ -27,7 +30,6 @@ should not follow redirect nor throw exceptions on HTTP responses with status 4x
The following interfaces MAY be implemented together within a single class or
in separate classes.


### HttpClientInterface

```php
Expand Down

0 comments on commit 32dba79

Please sign in to comment.