kurageneko8 / json-response
return HTTP status
1.1.1
2022-01-18 12:25 UTC
Requires
- php: >= 5.3.0
README
return HTTP status
Installation
composer require kurageneko8/json-response
Usage
<?php require_once __DIR__ . "/vendor/autoload.php"; use Devscreencast\ResponseClass\JsonResponse; $student = array( 'name' => 'Jon D', 'course' => 'Soft Engineer', 'level' => '200', 'collections' => ['books' => 'Intro to URL', 'music' => 'rap'] ); new JsonResponse('unauthorized', 'ok', $student);
Param1 (Required)
- Success - 200 http status
- unauthorized - 401 http status
- exception - 500 http status
Param2 (Optional)
string
Param3 (Oprtonal)
Array