liveBook · Manning

HTTP header

Also called message header

An HTTP header is a named field in an HTTP message that carries metadata or control information about the message, its content, or its processing.

How 5 Manning books explain it

Kafka for Architects

A message header is auxiliary metadata attached to a Kafka record independently of its key and value.

How it is used
Carries technical context on Kafka messages, particularly producer identification for tracing malformed data.
How deep it goes
Defines headers by their place in a message and gives a producer-identification practice, but no header API or format.
Examples
Uses an incorrectly formatted message to motivate storing the producing application's identifier in a header.
What you can do after
Apply it via producer service code to label messages for source tracing and accountability.

Read how Kafka for Architects explains HTTP header →

The Design of Web APIs, Second Edition

A response header is a metadata field returned in an HTTP response that conveys protocol, representation, or application information.

How it is used
Carries response metadata, such as a newly created product’s URL, when that output fits a standard HTTP header.
How deep it goes
Explains response placement and output-location choices, then works through an OpenAPI header declaration and inline value schema.
Examples
Uses POST /products returning 201 Created with a Location header and an OpenAPI declaration marking its string value required.
What you can do after
Apply it via OpenAPI to place a created resource URL in a required Location header and describe its value.

Read how The Design of Web APIs, Second Edition explains HTTP header →

Spring in Action, Sixth Edition

A response header is an HTTP field carrying metadata from a server response separately from its payload body.

How it is used
Uses response headers when a RestTemplate client needs metadata in addition to the returned resource payload.
How deep it goes
Explains header access through ResponseEntity and getForEntity(), but does not show server-side header creation.
Examples
Demonstrates inspecting the Date header while fetching an ingredient resource.
What you can do after
Apply it via RestTemplate to inspect response metadata and retrieve the accompanying payload body.

Read how Spring in Action, Sixth Edition explains HTTP header →

Spring Security in Action, Second Edition

An HTTP header is a field in an HTTP request or response that conveys metadata or control information.

How it is used
Controls browser acceptance of cross-origin requests through response metadata.
How deep it goes
Defines three important CORS headers and demonstrates browser rejection, while deferring detailed header syntax and configuration.
Examples
Uses XMLHttpRequest, localhost and 127.0.0.1 origins, a POST endpoint, and a missing-header browser error.
What you can do after
Diagnose browser CORS failures by checking whether the response includes an appropriate Access-Control-Allow-Origin header.

Read how Spring Security in Action, Second Edition explains HTTP header →

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.

How it is used
Carries small amounts of request data outside the URI when a client sends values to a server.
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.

Read how Spring Start Here, Second Edition explains HTTP header →

Also covered in

What to know first

Related concepts

Questions about HTTP header

What is HTTP header?

An HTTP header is a named field in an HTTP message that carries metadata or control information about the message, its content, or its processing.

Which Manning books explain HTTP header?

Kafka for Architects, The Design of Web APIs, Second Edition, Spring in Action, Sixth Edition, Spring Security in Action, Second Edition and Spring Start Here, Second Edition.

What should I know before learning HTTP header?

Manning books that teach HTTP header usually introduce JSON, uri, authorization and HTTP first.

What kinds of HTTP header are there?

Kinds of HTTP header include Accept header and Accept-Language.

What is HTTP header part of?

HTTP header is part of HTTP response. An HTTP response is a message sent by a server to a client in reply to an HTTP request, containing a status and optionally headers and content.

What is HTTP header also called?

HTTP header is also called message header.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.