From 0efc74ebe6ccaacb5ad3d6d8189175c5a372917c Mon Sep 17 00:00:00 2001 From: prototrip Date: Sat, 7 Aug 2021 14:02:17 +0300 Subject: [PATCH] added return to header change --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.php b/api.php index 9bf9b7a..97959b3 100644 --- a/api.php +++ b/api.php @@ -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) {