Skip to Content
RESTful Web API Design with Node.js 10 - Third Edition
book

RESTful Web API Design with Node.js 10 - Third Edition

by Valentin Bojinov
April 2018
Intermediate to advanced content levelIntermediate to advanced
178 pages
3h 51m
English
Packt Publishing
Content preview from RESTful Web API Design with Node.js 10 - Third Edition

Principle 3 – Manipulate resources via standard HTTP methods

The native HTTP protocol (RFC 2616) defines eight actions, also known as HTTP verbs:

  • GET
  • POST
  • PUT
  • DELETE
  • HEAD
  • OPTIONS
  • TRACE
  • CONNECT

The first four of them just feel natural in the context of resources, especially when defining actions for data manipulation. Let's make a parallel with relative SQL databases where the native language for data manipulation is CRUD (short for Create, Read, Update, and Delete), originating from the different types of SQL statements, INSERT, SELECT, UPDATE, and DELETE, respectively. In the same manner, if you apply the REST principles correctly, the HTTP verbs should be used as shown here:

HTTP verb Action HTTP response status code
GET Retrieves ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

RESTful Web API Design with Node.js - Second Edition

RESTful Web API Design with Node.js - Second Edition

Valentin Bojinov
Hands-On RESTful API Design Patterns and Best Practices

Hands-On RESTful API Design Patterns and Best Practices

Harihara Subramanian J, Anupama Murali, Pethuru Raj

Publisher Resources

ISBN: 9781788623322Supplemental Content