https://github.com/omissis/psr-http
Set of interfaces for PSR-HTTP proposal
https://github.com/omissis/psr-http
Last synced: 8 months ago
JSON representation
Set of interfaces for PSR-HTTP proposal
- Host: GitHub
- URL: https://github.com/omissis/psr-http
- Owner: omissis
- Created: 2013-05-03T13:47:12.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-13T11:40:29.000Z (over 12 years ago)
- Last Synced: 2023-03-11T19:52:56.318Z (over 2 years ago)
- Language: PHP
- Size: 133 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PSR-HTTP
========This is a draft based on the work of the psr group on putting together a set of interfaces for http messages.
This work is based on @thewilkybarkid's work and all the posts in the group discussion here:
https://groups.google.com/forum/?fromgroups=#!topic/php-fig/73cM2qq_uhoSome guidelines I try to stick to:
* Interfaces shouldn't contain constructor
* SetBody() should account various data types
* HTTP response code and description must be separated
* Read-only messages skipped because it happens quite often that the have to be modified
* As long as there are no implementation provided, Factories are provided
* Body should be mixed and castable to string
* Request and response should not know about each other
* A response(and a request) should be: serializable, aware of itself only, a value object
* Headers interfaces: can be generic or detailed ones. Interfaces for most common headers are provided but not necessarily used.