开发者

CakePHP Rest Plugin Question

开发者 https://www.devze.com 2023-03-29 18:00 出处:网络
I am new to REST. I understand how to create the functions within the application. BUT I am not sure how to access the JSON request using REST with headers. I am usin开发者_运维问答g CakePHP as my fra

I am new to REST. I understand how to create the functions within the application. BUT I am not sure how to access the JSON request using REST with headers. I am usin开发者_运维问答g CakePHP as my framework and in addition to that I am using the CakePHP REST plugin by KVZ (https://github.com/kvz/cakephp-rest-plugin). I am using ACL within my application and therefore I need to login using REST headers or however you access that information. I am pretty sure your suppose to use the amazon S3 authentication method but I don't understand it. I haven't been able to find any clear information on this.

THE QUESTION: How do I access the function (http://localhost:5555/app/data/getAll.json) using a REST JSON Request with PHP? Please include how to send the username and password with HTTP_AUTHORIZATION/header. The more detailed the answered, the better.

Thanks


REST isn't a technology, its just a way of naming your urls. Have a look at http://www.xfront.com/REST-Web-Services.html. You can use any mechanism you like to access the page although Curl with PHP is probably the easiest way for you.

Have a look at the PHP curl docs, there are examples there to guide you.

0

精彩评论

暂无评论...
验证码 换一张
取 消