DEV Community

Cover image for Basics of  RESTful API
crackingdemon
crackingdemon

Posted on

Basics of RESTful API

πŸŽ‡A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services.
πŸŽ‡REST stands for representational state transfer and was created by computer scientist Roy Fielding

Restful Api
1-- Make a simple server of node Js and expressπŸ•Ά.
image

2-- Make Connection to the MongoDB(It's an example of Offline Mongo Db Database)πŸŽ†
image
3-- Actions in API πŸ”¨

The action should be indicated by the HTTP request method that we’re making. The most common methods include GET, POST, PUT, and DELETE.

  • GET retrieves resources.
  • POST submits new data to the server.
  • PUT updates existing data.
  • DELETE removes data.

For Example - image

4-- Examples Of GET , POST , PUT , PUT , DELETE
image

Main HTTP Methods.
image

5-- Example Of URL
image

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (1)

Collapse
 
nasasira profile image
Nasasira β€’

Great article and yeah the RESTful API is one of the most popular API architecture styles, which can help you separate client-side and server-side concerns, allowing the front and back ends to iterate separately.
You can also read a more detailed piece in this article

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay