add: include http status codes in json response

This commit is contained in:
Johannes Kantz 2023-01-23 01:08:14 +01:00
parent 288dbd6d4c
commit 83019b999c

View File

@ -31,6 +31,7 @@ class Response
http_response_code($status); http_response_code($status);
} }
header('Content-Type: application/json; charset=utf-8'); header('Content-Type: application/json; charset=utf-8');
$data["status"] = http_response_code();
echo json_encode($data); echo json_encode($data);
} }