With POST Tunneling, you are simply making a POST request act like a different type of request. Why is this neceesary? Because if you're using AJAX, most browsers only allow you to send GET or POST requests.
What needs to change?
- The headers sent with the request in the JavaScript file:
headers: {'X_METHODOVERRIDE': 'DELETE'}
- Django middleware. So that the method is updated for requests that contain the
X_METHODOVERRIDE
header.