Concept Flow - Request headers (Content-Type, Accept)
Client prepares request
Set headers: Content-Type, Accept
Send request to server
Server reads Content-Type
Server processes data accordingly
Server prepares response
Server sets response Content-Type
Client reads response based on Accept header
The client sets Content-Type to tell the server the data format sent, and Accept to tell what response formats it can handle. The server uses these headers to process and respond correctly.