Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning API Development with Node.js

You're reading from   Beginning API Development with Node.js Build highly scalable, developer-friendly APIs for the modern web with JavaScript and Node.js

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781789539660
Length 100 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Anthony Nandaa Anthony Nandaa
Author Profile Icon Anthony Nandaa
Anthony Nandaa
Arrow right icon
View More author details
Toc

Understanding Requests

Let's have a look at the concept of request and the different HTTP request methods.

A Look at HTTP Request Methods

Having set up our server, we are ready to start building our API. The routes are basically what constitute the actual API.

We will first look at HTTP request methods (sometimes referred to as HTTP verbs), then apply them to our API using a simple todo list example. We will look at five major ones:

  • GET: Requests a representation of the specified resource. Requests using GET should only retrieve data, and should not be used to make changes to resources.
  • POST: Is used to submit an entry to a specified resource, often causing a change of state.
  • PUT: Replaces all current representations...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image