Hello, I'm discovering DRF. When I type http://foo/api/friends/3/ in my browser, I'm seeing content describing Friend 2 or Friend 3 instance.
When I type curl -X DELETE http://foo/api/friends/2/ a DELETE request is sent to my Django app and everything works OK as Friend 2 is removed from database. When looking at Friend 3 instance, I can see a DELETE and a Delete buttons. When I click over DELETE then Delete buttons, a GET request is sent over to my Django instance. I would expect a DELETE request to be sent. I tried this with both Firefox 68 ESR and Chromium 57 and with both a GET request is sent instead of a DELETE one. I also tried with PATCH button: a GET request is also sent. Looking at this HTTP request capture, I do not see any evidence reflecting a DELETE or PATCH intent. Looking at page HTML source code, I can see that buttons are mapped to GET request with an intriguing "data-method" set to DELETE or PATCH. 1. Is it possible to have these browsers sending expected DELETE or PATCH requests ? Is it something that can be configured by Django ? Within browsers themselves ? 2. Is it possible to have these browsers still sending GET request but have my Django app mapping these requests to the DELETE/PATCH/whatever methods these requests are supposed to be mapped to ? Best regards -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8e6de397-eb9a-4d91-9117-c4d21279ed04%40googlegroups.com.