public function postToTags($r) { $tag_name = $r->getBody(); //todo: make this work w/ cookie OR http auth?? $user = $r->getUser(); $tag = Dase_DBO_Tag::create($this->db, $tag_name, $user); if ($tag) { //todo: should send a 201 w/ location header $user->expireDataCache($r->getCache()); $r->renderResponse('Created "' . $tag_name . '"'); } else { $r->renderError(409, 'Please choose another name.'); } }