How browsable API works in django rest Framework?

Viewed 345

I want to know how django's browsable API works.

When I open browsable API with a browser, it renders a html page.
But when I fetch data from postman or any other service, it gives json data.

So how this works? And, how can I do it without django rest framework.?

1 Answers

From doc.

By default, the API will return the format specified by the headers, which in the case of the browser is HTML. The format can be specified using ?format= in the request, so you can look at the raw JSON response in a browser by adding ?format=json to the URL. There are helpful extensions for viewing JSON in Firefox and Chrome.

Related