Friday, April 8, 2011

REST Requests in PHP

REST is a way of interacting with resources on the web via a plain URL. It stands for REpresentational State Transfer.
REST-style architectures consist of clients and servers. Clients initiate requests to servers and Servers process these requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources.
A basic web page is an example of a REST resource.
The REST architectural style describes six constraints applied to the architecture as below
Client–server, Stateless, Cacheable, Layered system, Code on demand (optional) and Uniform interface
We can know more info about REST from WIKI by searching for "Representational State Transfer".
PayPal API, Twitter API, Google HTTP Geo Coder are some of the examples for REST APIs.
In PHP how do we call these REST Requests:
CURL and FILE_GET_CONTENTS are the two methods by which we can send REST Requests to remote servers.

No comments:

Post a Comment