added return to header change
This commit is contained in:
parent
ef8d7921d2
commit
0efc74ebe6
2
api.php
2
api.php
@ -11,7 +11,7 @@ $api->count = 4; // process count
|
|||||||
$api->any('/', function ($requst) {
|
$api->any('/', function ($requst) {
|
||||||
// return 'Hello world';
|
// return 'Hello world';
|
||||||
$data = "{'test':'ok'}";
|
$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) {
|
$api->get('/hello/{name}', function ($requst, $name) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user