HTTP Response Header
Predict Output Easy
Question
What type of content does this response contain?
Code
Content-Type: application/json
Hint
Content-Type tells the client what data format to expect.
Explanation
The Content-Type: application/json header tells the client that the response body contains JSON data. The browser and fetch API use this to determine how to parse the response. Common types include text/html for web pages, text/css for stylesheets, and image/png for images.
Related Resources
Related Lessons
- HTTP
Learn HTTP protocol.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.