Course Content
Introduction to Node.JS
0/1
Installation
0/1
Feature of Node.JS
0/1
Types of File Operations
0/1
Routing, Params, Request, and Response
0/1
HTTP Status Codes
0/1
Node JS
About Lesson

What is an API?

  • API stands for Application Programming Interface.
  • It allows two applications to communicate with each other.
  • Example: When you use a food delivery app, it fetches restaurant data from a server using an API.

What is REST API?

  • REST (Representational State Transfer) is an architectural style used for building web services.
  • REST APIs allow communication between a client (e.g., a web browser, mobile app) and a server.
  • It uses HTTP methods like GET, POST, PUT, DELETE to interact with data.
  • Think of a restaurant:
    • A customer (client) orders food from a waiter (API).
    • The waiter goes to the kitchen (server) and brings back the food.
    • The customer does not need to know how the kitchen works, they just request and receive.
    • Similarly, a REST API fetches data from a server when requested.