Download the PHP package harryosmar/php-restful-api-response without Composer
On this page you can find all versions of the php package harryosmar/php-restful-api-response. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download harryosmar/php-restful-api-response
More information about harryosmar/php-restful-api-response
Files in harryosmar/php-restful-api-response
Download harryosmar/php-restful-api-response
More information about harryosmar/php-restful-api-response
Files in harryosmar/php-restful-api-response
Vendor harryosmar
Package php-restful-api-response
Short Description php restful api response implement PSR-7: HTTP message interfaces
License
Package php-restful-api-response
Short Description php restful api response implement PSR-7: HTTP message interfaces
License
Please rate this library. Is it a good library?
Informations about the package php-restful-api-response
php rest-api response implement PSR-7: HTTP message interfaces
Requirements
- php >= 7.0
- composer https://getcomposer.org/download/
Features
- Implement PSR-7: HTTP message interfaces, extend https://github.com/zendframework/zend-diactoros
- Provides response format http://fractal.thephpleague.com/
- Provides basic errors response
How To Setup
-
add this lines to your
composer.json
file - then run
composer install
orcomposer update
How To Use
Simple example how to use
response
Available Response Format
- with array
- with item
- with collection
- error
- With Error
- 403 Forbidden
- 500 Internal Server Error
- 404 Not Found
- 401 Unauthorized
- 400 Bad Request
- 410 Gone
- 405 Method Not Allowed
- 431 Request Header Fields Too Large
- 422 Unprocessable Entity
With Array
response
With Item
For this sample, we use class Book as an item
response 201
With Collection
response 200
Error
With Error
response 500
403 Forbidden
response 403
500 Internal Server Error
response 500
404 Not Found
response 404
401 Unauthorized
response 401
400 Bad Request
response 400
410 Gone
response 410
405 Method Not Allowed
response 405
431 Request Header Fields Too Large
response 431
422 Unprocessable Entity
response 422
How To Run The Test
How To Contribute
- Fork this repo
- post an issue https://github.com/harryosmar/php-restful-api-response/issues
- create the PR(Pull Request) and wait for the review
All versions of php-restful-api-response with dependencies
PHP Build Version
Package Version
The package harryosmar/php-restful-api-response contains the following files
Loading the files please wait ....