Longer note: Why Postman and Laravel disagree.
// problem · 9 may 2026 · 1 min
API works in Postman but fails in Laravel
The request you think you are sending is not always the request that leaves the process.
Time wasted: 2 hours
Problem
Environment
Symptoms
Expected
Investigation
Things I tried
Root cause
Solution
Why it worked
Lesson
Found something wrong?
These notes can be incomplete, or wrong in a different environment. Suggest a correction on GitHub or email me at me@t4mer.net.
// related
// article
Why Postman and Laravel can send “the same request” and get different results
Headers, encodings, and the dangerous comfort of a green Postman screenshot.
// til
TIL: Accept and Content-Type are different
Content-Type is what you are sending. Accept is what you are willing to receive. Mixing them is a classic API bug.
// problem
Laravel authentication error returning HTML instead of JSON
The API client expected JSON. Laravel thought it was talking to a browser.