Hacker News new | past | comments | ask | show | jobs | submit login

The `Accept` HTTP header is there to prove your frontend is using "dumb" data. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...

I think the author is generally correct that all data should be provided in a single request. And to take it a step further, you should be able to change your accept header to JSON to serve an API. API/dumb-frontend aren't mutually exclusive.

In fact, this is what both GitLab and GitHub do. Try it out!

`curl -L https://github.com/simonw/shot-scraper` (defaults to text/html)

`curl --header "Accept: application/json" -L https://github.com/simonw/shot-scraper`




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: