m残りのAPIをzfで開発しています。 これは私のユーザコントローラです。残りのAPIアクション
From indexAction() returning all articles
を取得し、このURL http://quickstart.local/user/
メートルを実行していることで、私はポストをテストすることができますどのように
From getAction() returning the requested article
を取得し、このURL http://quickstart.local/user/1
メートルを実行して、
<?php
class UserController extends Zend_Rest_Controller
{
public function init()
{
$this->_helper->viewRenderer->setNoRender(true);
}
public function indexAction()
{
$this->getResponse()
->appendBody("From indexAction() returning all articles");
}
public function getAction()
{
$this->getResponse()
->appendBody("From getAction() returning the requested article");
}
public function postAction()
{
$this->getResponse()
->appendBody("From postAction() creating the requested article");
}
public function putAction()
{
$this->getResponse()
->appendBody("From putAction() updating the requested article");
}
public function deleteAction()
{
$this->getResponse()
->appendBody("From deleteAction() deleting the requested article");
}
}
?>
は、アクションを削除し、置きます。
おかげ
窓を使用しているので、他の方法があります – XMen