From d2c0ffca8b70ec603f451a687ce69936c3805bcb Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Sat, 10 Oct 2020 13:41:03 +0200 Subject: [PATCH] Returning status code also as HTTP header --- jensmemes.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jensmemes.php b/jensmemes.php index 376aa11..05e9588 100644 --- a/jensmemes.php +++ b/jensmemes.php @@ -179,10 +179,9 @@ if ($method == "GET") { case "/admin": admin(file_get_contents("php://input")); } - - } header('Content-Type: application/json'); +http_response_code($obj->status); echo stripslashes(json_encode($obj, JSON_UNESCAPED_UNICODE)); function endpoints() {