Initial commit
This commit is contained in:
17
check.php
Normal file
17
check.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0){
|
||||
http_response_code(400);
|
||||
echo json_encode(["status" => "fail", "message" => "Request method must be POST"]);
|
||||
exit();
|
||||
}
|
||||
|
||||
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
|
||||
|
||||
if(strcasecmp($contentType, 'application/json') != 0){
|
||||
http_response_code(400);
|
||||
echo json_encode(["status" => "fail", "message" => "Content type must be: application/json"]);
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user