django-rest-framework-docs icon indicating copy to clipboard operation
django-rest-framework-docs copied to clipboard

[Live API] GET request successful but response is null

Open aviaryan opened this issue 8 years ago • 3 comments

I am testing the Live API endpoints feature of drf-docs. The server is running on localhost. Get request is sent successfully as I can verify it from the running server's terminal.

Here is a screenshot

screenshot from 2016-04-07 01 58 49

Is there some way I can help debug the issue . Thanks

aviaryan avatar Apr 06 '16 20:04 aviaryan

Another thing I would like to mention is when the "live api" overlay opens, the response status is fixed at "awaiting request" for eternity. Only when I press "send", the response changes to the above screenshot.

aviaryan avatar Apr 06 '16 20:04 aviaryan

I'm having the same issue with the null response. You need to add "?format=json" to your url so it would be "/api/users/?format=json".

alej0varas avatar May 31 '16 08:05 alej0varas

As mentionned by @alej0varas you can append ?format=json to your endpoint or you can directly add JSONRenderer as your default renderer in your settings : http://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers .

kainxspirits avatar Jul 01 '16 09:07 kainxspirits