Making RESTful Requests

At its core, REST is a set of principles built on top of HTTP. With REST, each URL path points to a specific resource. In other words, URLs are things. This is in direct contrast to many server designs where a given path invokes a script that does something (URLs are actions).

HTTP itself is a request/reply protocol where each request is made to a URL with a particular method. The HTTP method for an incoming request determines what kind of action the server should take on the resource indicated in the URL.

Any database you work with will offer at least the four basic operations: create, read, update, and delete (CRUD). RESTful datastores like CouchDB use a different HTTP method (or verb) for each operation. You use POST ...

Get Node.js the Right Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.