Hi,
I have a django app with the rest framework.
I have the following settings:
REST_FRAMEWORK = {
...
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.UnicodeJSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
),
...
}
For some reason when I call any API via the browser, I see 2 same requests in my log:
[20/May/2014 07:19:30] "GET /api/v1/ HTTP/1.1" 200 8899
[20/May/2014 07:19:30] "GET /api/v1/ HTTP/1.1" 200 1625
I get only one request if I call the same api via curl or via ajax call from the browser console.
I also get only one request if I type in the browser any other app url except apis.
If I call any API with "?format=json", I get only one request.
What I noticed is that on the first call I go through BrowsableAPIRenderer and UnicodeJSONRenderer and on the second call I go only through UnicodeJSONRenderer.
You can also see that the response sizes are different.
Do you have any idea why every API get called twice?
Thanks, Alex A.