🔴How well do you know APIs?
Let's delve into the 4 Components of a REST API! 🚀🤔
1. API client
2. API request
3. API server
4. API response
📌API client
The API client is the software or application that initiates requests to the API server to retrieve or manipulate data.
It acts as an intermediary between the end-user or application and the API server.
The API client is responsible for sending properly formatted requests to the server and handling the responses received.
👉Example:
Let's say you have a mobile application that displays weather information for a user's location.
The mobile app acts as the API client in this scenario.
When the user opens the app, it sends a request to the weather API server to fetch the current weather data for the user's location.
📌API request:
The API request is a message sent by the API client to the API server, indicating the action it wants to perform.
This request contains information such as the specific API endpoint (URL), request method (GET, POST, PUT, DELETE, etc.), headers, and sometimes data (e.g., in the case of a POST request).
👉Example:
In the weather app example, the API request might be a GET request to the weather API server with the endpoint like "https://lnkd.in/g6f6fXVj" to get the current weather data for the user's location.
📌API server:
The API server is a software application that receives API requests from clients, processes those requests, interacts with the database or other services as needed, and generates a response back to the API client.
It acts as the gateway to the backend system, providing access to the requested resources.
👉Example:
The weather API server receives the GET request from the mobile app's API client, processes the request, queries the weather data for the user's location from its database or external services, and then generates a response containing the weather information.
📌API response:
The API response is the message sent by the API server to the API client in reply to the API request.
It contains the data requested by the client, along with any relevant metadata or status codes to indicate the success or failure of the request.
👉Example:
After processing the GET request from the weather app's API client, the API server generates an API response containing the current weather data for the user's location, such as temperature, humidity, and weather conditions.
This response is then sent back to the API client (mobile app), which can then display the weather information to the user.
Image credit: Postman
#sidpost #api #software #softwaretesting #career #technology #testautomation
Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session
Basic Linux Commands for Automation QA
****************************************
TOP 15 BDD - CUCUMBER Interview Q&A
************************************************
✍️AUTHOR: LinkedIn Profile
************************************************
*************************************************
SeleniumWebdriver Automation Testing Interview Questions:
https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver
API Testing Interview Question Set:
https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html
DevOps Interview Q&A:
https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes
Docker Interview Question Set
https://automationreinvented.blogspot.com/Docker
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign
Java Related Interview Question Set
https://automationreinvented.blogspot.com/search/label/Java
GIT Interview Question Set:
https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html
Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
Mobile Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Mobile%20Testing
Python Interview Question Set for QAE - SDET - SDE:
https://automationreinvented.blogspot.com/search/label/Python
No comments:
Post a Comment