The Content-Type header says this body is JSON.

highlighted = computed this step

Content-Type names JSON

The Content-Type row says the body should be read as JSON in this toy example.

Content-Type JSON\text{Content-Type JSON}
JSON Content-TypeThe JSON request rows, body rows, field rows, and length check are recomputed from pinned bytes.JSON Content-Type - POST /api JSON body 17 bytes, fields ok=true and n=3sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/apiparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderContent-Typeapplication/jsonJSONheaderContent-Length17declared bytesbodydisplay wordsok true comma n threesafe display formbodyexact hex7b226f6b223a747275652c226e223a337dpinned bytesbodybyte length17countedfieldokok=trueparsedfieldnn=3parsedcheckContent-Length17declaredcheckbody bytes17recomputedcheckmatchyessame count

The header is separate from the body

The header says how to read the body. It is not one of the JSON fields.

header before body\text{header before body}
JSON Content-TypeThe JSON request rows, body rows, field rows, and length check are recomputed from pinned bytes.JSON Content-Type - POST /api JSON body 17 bytes, fields ok=true and n=3sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/apiparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderContent-Typeapplication/jsonJSONheaderContent-Length17declared bytesbodydisplay wordsok true comma n threesafe display formbodyexact hex7b226f6b223a747275652c226e223a337dpinned bytesbodybyte length17countedfieldokok=trueparsedfieldnn=3parsedcheckContent-Length17declaredcheckbody bytes17recomputedcheckmatchyessame count

The body rows come after the blank line

The body display row is readable, and the exact body bytes are carried by the hex row.

body after headers\text{body after headers}
JSON Content-TypeThe JSON request rows, body rows, field rows, and length check are recomputed from pinned bytes.JSON Content-Type - POST /api JSON body 17 bytes, fields ok=true and n=3sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/apiparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderContent-Typeapplication/jsonJSONheaderContent-Length17declared bytesbodydisplay wordsok true comma n threesafe display formbodyexact hex7b226f6b223a747275652c226e223a337dpinned bytesbodybyte length17countedfieldokok=trueparsedfieldnn=3parsedcheckContent-Length17declaredcheckbody bytes17recomputedcheckmatchyessame count

Summary

Content-Type tells the toy reader which body shape to expect.

JSON body expected\text{JSON body expected}
JSON Content-TypeThe JSON request rows, body rows, field rows, and length check are recomputed from pinned bytes.JSON Content-Type - POST /api JSON body 17 bytes, fields ok=true and n=3sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/apiparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderContent-Typeapplication/jsonJSONheaderContent-Length17declared bytesbodydisplay wordsok true comma n threesafe display formbodyexact hex7b226f6b223a747275652c226e223a337dpinned bytesbodybyte length17countedfieldokok=trueparsedfieldnn=3parsedcheckContent-Length17declaredcheckbody bytes17recomputedcheckmatchyessame count