Returning JSON
If Encryption is Enabled JSON will be JWT Instead of normal JSON Ouput with header application/json
Response Return JSON
$Request->Response('JSON' , ['status' => true, 'message' => "Hi!"]);
In Action
<?php
class Welcome extends Controller{
public $defaultController = "index";
public function index(){
echo $this->Response('JSON' , ['status' => true, 'message' => "You've Successfully Saw the API!"]);
}
}
Last updated