REST and Ajax

You know already that the XMLHTTPRequest object has methods that allow you to directly deal with HTTP request types and URLs.

Accessing RESTful web services is therefore simplified to a great extent. Because you know that each resource exposed by the web service API has a unique URL, and that the methods made available by the service are standard HTTP methods, it becomes a simple matter to construct the required XMLHTTPRequest calls.

The prospect of being able to access a wide variety of web services from within Ajax applications, and use the returned information within those applications, is attractiveeven more so if you can use a consistent and simple interface protocol.