Skip to content

Commit

Permalink
Merge pull request #2 from php-http/liskov
Browse files Browse the repository at this point in the history
Added note about Liskov
  • Loading branch information
Nyholm authored Sep 8, 2016
2 parents a88a1ca + 94bea9f commit 0dbd389
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions proposed/http-client/http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ The goal of this PSR is to allow developers to create libraries decoupled from H
implementations. This would make libraries more stable since the reduced number of
dependencies and the likelihood to get in version conflicts is reduced.

The second goal is that all HTTP clients should follow the [Liskov substitutions principle][Liskov].
This means that all clients should act the same when sending a request. By default a HTTP client
should not follow redirect nor throw exceptions on HTTP responses with status 4xx or 5xx.

## Interfaces

The following interfaces MAY be implemented together within a single class or
Expand Down Expand Up @@ -144,6 +148,4 @@ interface HttpException extends Exception
public function getResponse();
}
```



[Liskov]: https://en.wikipedia.org/wiki/Liskov_substitution_principle

0 comments on commit 0dbd389

Please sign in to comment.