Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.4 KB

README.MD

File metadata and controls

41 lines (32 loc) · 1.4 KB

WEB API'S

What is an API ?


API stands for Application Programming Interface.

• A Web API is an application programming interface for the Web.

• A Browser API can extend the functionality of a web browser.

• A Server API can extend the functionality of a web server.

How does an API work ?


An API works as a mediator between two applications, allowing them to communicate with each other. Here's a basic overview of how it works:

  1. Request A client application sends a request to the API The request usually includes: The API endpoint (a specific URL) The method (GET, POST, PUT, DELETE, etc.) Headers (additional information about the request) Sometimes, a body (data sent with the request)

  2. Processing The API receives the request and processes it This might involve: Authenticating the request Validating the data Performing the requested operation (like fetching data from a database)

  3. Response After processing, the API sends back a response This typically includes: A status code (indicating success, failure, etc.) Response headers The requested data (usually in a format like JSON or XML)

  4. Client-side Handling The client application receives the response and processes it accordingly

This process allows different software systems to interact and share data, even if they're built with different technologies or run on different platforms.