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.
Browsers will indicate that they prefer HTML, so that's what REST framework serves them.
Much thanks!