16 lines
399 B
PHP
16 lines
399 B
PHP
<?php
|
|
ini_set('display_errors', 1);
|
|
error_reporting(E_ALL);
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
$raw = file_get_contents("php://input");
|
|
echo json_encode([
|
|
"raw_input" => $raw,
|
|
"json_decoded" => json_decode($raw, true),
|
|
"json_error" => json_last_error_msg(),
|
|
"request_method" => $_SERVER['REQUEST_METHOD'],
|
|
"content_type" => $_SERVER['CONTENT_TYPE'] ?? 'not set',
|
|
]);
|
|
?>
|