From 93ac0bcae3a600733045ad7a5bafabcdfd49d9e5 Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 20 Jul 2008 04:34:28 -0400 Subject: Twitter-compatible API - refactoring and bug fixes darcs-hash:20080720083428-ca946-c14a92345366f2105b3c452a3899714d89692daa.gz --- actions/twitapihelp.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actions/twitapihelp.php') 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); } -- cgit v1.2.3-54-g00ecf