dev1234
dev1234

Reputation: 5716

Yii rest API doesnt work

i have created a api by going through the wiki article give here http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api/

i have done everything according to the article but still having issues.

i am getting the following error.

Error 404 Unable to resolve the request "api/list".

when i send the request as following only i get the above error.

http://www.example.com/RestApi/index.php/api/posts

Upvotes: 1

Views: 1862

Answers (1)

Developerium
Developerium

Reputation: 7265

use restfullyii extention,

I'm currently using it, very easy to add to your application,

Makes quickly adding a RESTFul API to your Yii project easy. RestfullYii provides full HTTP verb support (GET, PUT, POST, DELETE) for your resources, as well as the ability to offset, limit, sort, filter, etc… . You will also have the ability to read and manipulate related data with ease.

RestfullYii has been lovingly rebuilt from the metal and is now 100% test covered! The new event based architecture allows for clean and unlimited customization.

Upvotes: 1

Related Questions