Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Tri Nguyen
Tri Nguyen

Posted on

     

Understand basic REST Methods

What is up fellow coder.

Thank you for checking out my article on Understanding REST methods and its correlation with EXPRESS server.

Lets get right into it!

What is REST Method ?

Well it stands for Representational State Transfer.......

Ok, since this article is about REST methods associated with Express Router and Node.js. REST is the different HTTP routes that can define the relationship/interaction between the client/server for our applications.

And these methods can be used to map outCRUD (create, retrieve, update, delete) operations. An example of CRUD application can be Facebook, because you can create content, retrieve content, update content, and delete content.

Big Picture: when building a CRUD application you will need your
Web page(html,CSS, and JavaScript), a database to get and store data, and a Server to configure the application and create routes between clients and database. Essentially you can imagine using REST methods is used as a way for the server to respond to what the client wants to do and apply the changes to the database.

Lets Apply

Lets take a look at some of the main REST methods and their correlation with a CRUD application.

  1. GET - this method retrieves information, a GET request can be made by a client or server to get information from a database. (Theretrieve part of CRUD)

  2. POST - this request is often used to create a new entity. Clients post new content, which in turn the content will either create new data or update data in the database. (thecreate part of CRUD)

  3. PUT - Store an entity at a URI. PUT can update an existing entity. A PUT request is idempotent, meaning clients can make that same call repeatedly while producing the same result. (the 'update' part of CRUD)

  4. DELETE - Request that a resource be removed. If a client removes a content, the database will remove that content from the database. (the 'delete' part of CRUD)

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Hi, my name is Tri, progressing to become the most creative, innovative developer.
  • Location
    Atlanta
  • Education
    Georgia State University
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp