Using the "extension" parameter

This commit is contained in:
Michael 2021-11-09 19:40:39 +00:00
parent b4fc1da045
commit a6db8df92d
5 changed files with 13 additions and 26 deletions

View file

@ -30,12 +30,12 @@ class Test extends BaseApi
{
public static function rawContent(array $parameters = [])
{
if (self::$format == 'xml') {
if (!empty($parameters['extension']) && ($parameters['extension'] == 'xml')) {
$ok = 'true';
} else {
$ok = 'ok';
}
self::exit('ok', ['ok' => $ok]);
self::exit('ok', ['ok' => $ok], $parameters['extension'] ?? null);
}
}