News Feed
Sections




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

Ian Selby's Blog:
Making RESTful Requests in PHP
May 15, 2009 @ 07:57:19

In a new post to his blog Ian Selby looks at working with REST requests in PHP. He includes some of the basics of REST too, for those not completely familiar with the term.

APIs have become a very commonplace part of many popular web sites and services...especially REST APIs. I've already discussed how you can roll your own REST API for your PHP apps, but I've also received countless requests to go over how to actually make RESTful requests. That's exactly what we'll take a look at in this article

His tool of choice is the curl extension, making it simple to create a class wrapper with methods like executePost, executeGet, setAuth and, of course, execute. He outlines the class and gives the code blocks that fit inside each of the major functions. In the end you'll have a class that can make GET, POST, PUT and DELETE requests and be able to correctly parse the response.

0 comments voice your opinion now!
delete post put get tutorial request rest


blog comments powered by Disqus

Similar Posts

NetBeans Blog: PHPUnit support added

Raphael Stolt's Blog: Installing Zend_Tool on Mac OS X

Job Posting: WorldNetJobs.com Seeks Expert PHP Developer (Multiple Locations - FL/MD/NY)

InsicDesigns Blog: Embracing PHP 5.3 MVC with MiMViC

Francesco Tassi: Switching From TDD to BDD With Behat and Symfony2


Community Events

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


extension release xdebug php7 performance symfony2 voicesoftheelephpant api example framework community opinion version introduction podcast conference series library interview laravel

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