Possible minor error in official tutorial?

12 views
Skip to first unread message

Ankush Thakur

unread,
Jun 17, 2016, 2:49:28 PM6/17/16
to django-res...@googlegroups.com
Hi, when following the official tutorial, I came across the section on http://www.django-rest-framework.org/tutorial/2-requests-and-responses/ that says "Similarly, we can control the format of the request that we send, using the Content-Type header." We then have two examples that are exactly alike except for `--form` and `--json`. 

When I ran them on my setup, I got exactly identical response from the server. I'm not sure how these two requests are different, and whether the output was supposed to be different but was perhaps not captured in the docs.

Some help?

Regards,
Ankush Thakur

Tom Christie

unread,
Jun 20, 2016, 4:45:24 AM6/20/16
to Django REST framework
The responses should be the same - it's the outgoing requests that are different.
If you use `--debug` you ought to be able to inspect the outgoing requests.

Ankush Thakur

unread,
Jun 21, 2016, 12:22:19 PM6/21/16
to Django REST framework
Wow, thank you so much! The --debug option is really helpful.

Best,
Ankush
Reply all
Reply to author
Forward
0 new messages