Skip to content

Commit

Permalink
Send back the REST API version as a header. It's on every request,
Browse files Browse the repository at this point in the history
which sucks, but it's totally unobtrusive because it's a header so
that's ok.  Decided that the current version is "3.0" although it will
surely change before the final 3.0 release.

Fixes ticket #1148
  • Loading branch information
bharat committed Jun 11, 2010
1 parent bb35aef commit 2c1e380
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/rest/helpers/rest.php
Expand Up @@ -18,9 +18,12 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class rest_Core {
const API_VERSION = "3.0";

static function reply($data=array()) {
Session::instance()->abort_save();

header("X-Gallery-API-Version: " . rest::API_VERSION);
if (Input::instance()->get("output") == "html") {
header("Content-type: text/html");
if ($data) {
Expand Down

0 comments on commit 2c1e380

Please sign in to comment.