Client–Server Architecture is a computing model where multiple clients request services or resources from a centralized server. The interaction is based on a request–response cycle, commonly used in web applications, APIs, and distributed systems.
In client–server systems, the client sends an HTTP request to a server endpoint. The server processes the request, interacts with databases or services, and returns an HTTP response containing status codes and data.
// Client sending an HTTP GET request using fetch API
fetch("https://api.example.com/users")
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
The client sends a GET request → Server processes it → Server sends back JSON data → Client displays or uses the data.
Use Postman to send GET and POST requests to a public API. Observe headers, status codes, and JSON responses.