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

It uses the client's 'Accept:' header which specifies which media types it prefers for the response (eg. 'text/html', 'application/json')

Browsers will indicate that they prefer HTML, so that's what REST framework serves them.




So obvious, I'm embarrassed I didn't think of it first.

Much thanks!




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

Search: