meezaan / microservice-helper
There is no license information available for the latest version (v0.1.0) of this package.
Microservice Helper
v0.1.0
2018-01-26 22:17 UTC
Requires (Dev)
- phpunit/phpunit: ^6.2
This package is auto-updated.
Last update: 2022-06-08 21:17:14 UTC
README
Usage
use Meezaan\MicroServiceHelper\HttpCodes; use Meezaan\MicroServiceHelper\Response; echo HttpCodes::getCode(401); // BAD REQUEST // Use to get output for an API with Http Status code built into the response echo Response::build('my message', 200); // ['code' => 200, 'status' => 'OK', 'data' => 'my message'];
To run tests
composer install
Then vendor/bin/phpunit tests/Unit