Hacker News new | ask | show | jobs
by mikl 2377 days ago
Arguably browser vs. API client is already covered by the Accept header. A browser request has something like `Accept: text/html,application/xhtml+xml,[…]`, where an API client request has something like `Accept: application/json`.

If the client requests HTML, it’s a pretty safe assumption they want to have something display-able.

1 comments

It's not even arguably - you are right. But the Accept header is also a mess these days and a lot of requests don't set it.