answer(400, [ "error" => "false_request_method", "error_text" => "Only POST allowed" ]); } $input = json_decode(file_get_contents("php://input"), true); if (!isset($input["name"]) || !isset($input["text"])) { $api->answer(400, [ "error" => "missing_fields", "error_text" => "Some fields are missing" ]); } $api->getSetting("");