Accept: What response formats the client can handle. Server picks one in Content-Type. The Accept header tells the server which formats the client can handle. A browser asks for text/html, while an API client usually sends Accept: application/json. The server picks the best match and states its choice in the Content-Type of the response.
The q values set preferences. text/html;q=0.9 means HTML is fine, but slightly less wanted than whatever has no q value. This is called content negotiation.
What should you keep in mind with Accept?
In practice, Accept explains some puzzling behaviour. A Laravel route that returns validation errors as a redirect in the browser returns JSON for the same request when the client sends Accept: application/json. If your API client receives an HTML error page instead of JSON, check this header first. Setting it correctly in every API call avoids a whole class of confusing bugs.
Use when reviewing or setting HTTP response headers for a web app or API - security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy), CORS headers, caching headers (Cache-Control, ETag, Last-Modified, Vary) and cookies (Set-Cookie flags). Also use when a security scan reports missing headers.
'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'
OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codeba