added return to header change

This commit is contained in:
prototrip 2021-08-07 14:02:17 +03:00
parent ef8d7921d2
commit 0efc74ebe6

View File

@ -11,7 +11,7 @@ $api->count = 4; // process count
$api->any('/', function ($requst) {
// return 'Hello world';
$data = "{'test':'ok'}";
new Response(200, ["Content-Type" => "application/json"], json_encode($data));
return new Response(200, ["Content-Type" => "application/json"], json_encode($data));
});
$api->get('/hello/{name}', function ($requst, $name) {