diff options
Diffstat (limited to 'actions/twitapihelp.php')
-rw-r--r-- | actions/twitapihelp.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actions/twitapihelp.php b/actions/twitapihelp.php index 5a35d8442..9701913f1 100644 --- a/actions/twitapihelp.php +++ b/actions/twitapihelp.php @@ -30,13 +30,15 @@ class TwitapihelpAction extends TwitterapiAction { function test($args, $apidata) { global $xw; if ($apidata['content-type'] == 'xml') { - header('Content-Type: application/xml; charset=utf-8'); + $this->init_document('xml'); common_start_xml(); common_element('ok', NULL, 'true'); common_end_xml(); + $this->end_document('xml'); } elseif ($apidata['content-type'] == 'json') { - header('Content-Type: application/json; charset=utf-8'); + $this->init_document('json'); print '"ok"'; + $this->end_document('json'); } else { common_user_error("API method not found!", $code=404); } |