News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kris Jordan's Blog:
Towards RESTful PHP - 5 Basic Tips
December 10, 2008 @ 12:08:27

Kris Jordan recently posted five tips to help you get a "more correct" REST interface in your application.

As we entered a programmable web of applications with APIs the decision to ignore HTTP gave us problems we're still dealing with today. We have an internet full of applications with different interfaces (GET /user/1/delete vs. POST /user/delete {id=1}). With REST we can say /user/1 is a resource and use the HTTP DELETE verb to delete it.

Here's the five (six?) tips:

  • Using PUT and DELETE methods
  • Send Custom HTTP/1.1 Headers
  • Send Meaningful HTTP Headers
  • Don't Use $_SESSION
  • Test with cURL or rest-client
  • Use a RESTful PHP Framework
0 comments voice your opinion now!
restful rest tip put delete custom header session curl framework


blog comments powered by Disqus

Similar Posts

Vinu Thomas' Blog: Project Jaws

Michael Nitschinger's Blog: RFC: li3_fixtures Rewrite

Michael Nitschinger's Blog: Quick Tip: Lithium Redirect

PHP Town Hall: Episode 1 - Composer Kicks Ass, Laravel 4 Is Coming, and PHP Hosting Sucks (Podcast)

Zend Developer Zone: The ZendCon Sessions Episode 17: SQL Query Tuning: The Legend of Drunken Query


Community Events











Don't see your event here?
Let us know!


symfony2 security project introduction facebook hack package hhvm composer unittest performance install podcast framework release language application threedevsandamaybe component database

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework