0.5.7 Requests and Responses

Web Communication Is a Conversation Between Systems

A basic web interaction has two core messages:

  • a request sent by the client;
  • a response sent by the server.

The request asks for something.

The response tells the client what happened and may include the requested information.

This exchange is a useful foundation for understanding the Web.

The Request Comes From the Client

A browser may request a resource such as:

Activity diagram showing Client Server, then Request: give me the resource at team.
ClientServer.
  • New
  • Changed
  • Removed

Real web requests contain more technical information than this simplified sentence.

For now, focus on the meaning:

The Response Comes From the Server

The server processes the request and returns a response.

Conceptually:

Activity diagram showing Server Client, then Response: here is the result for team.
ServerClient.
  • New
  • Changed
  • Removed

The response can contain:

  • a success result;
  • an error result;
  • HTML;
  • other data;
  • metadata describing the response.

The browser uses the response to decide what happens next.

Requests and Responses Travel in Opposite Directions

A simple model is:

Activity diagram showing Client request, then Server processing, then Server response, then Client interpretation.
ClientRequest.
  • New
  • Changed
  • Removed

This pattern provides the structure for modeling web interactions visually.