Returning status code also as HTTP header
This commit is contained in:
parent
1b52881fb5
commit
d2c0ffca8b
1 changed files with 1 additions and 2 deletions
|
@ -179,10 +179,9 @@ if ($method == "GET") {
|
||||||
case "/admin":
|
case "/admin":
|
||||||
admin(file_get_contents("php://input"));
|
admin(file_get_contents("php://input"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
http_response_code($obj->status);
|
||||||
echo stripslashes(json_encode($obj, JSON_UNESCAPED_UNICODE));
|
echo stripslashes(json_encode($obj, JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
function endpoints() {
|
function endpoints() {
|
||||||
|
|
Reference in a new issue