liveBook · Manning

HTTP header

As explained in Spring Start Here, Second Edition

An HTTP header is a metadata field in an HTTP request or response that conveys information about the message or its handling.

An HTTP request header carries a small amount of data from client to server without putting it in the URI. Headers can also be managed on a response; in Spring MVC, a controller can return a ResponseEntity to control response headers and status. section 8.1.1 section 10.6

Choose how to send client data based on its role and size:

  • Use request parameters for small key-value data in the URI; use headers for small data outside the URI. section 8.1.1
  • Use path variables for small mandatory values, and the request body for larger amounts of data. section 8.1.1

How Spring Start Here, Second Edition covers it

How deep it goes
Defines request-header location and size, then notes response-header control through ResponseEntity without showing header syntax.
Examples
Uses a contact form’s subject and body to frame sending client data to a server.
What you can do after
Understand how headers compare with other ways to send data in an HTTP request.
How it connects
Distinguishes request headers from request parameters, path variables, request bodies, and ResponseEntity.

Also explained in

Compare how 5 books explain HTTP header →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.