demo_requests_delete.py:
import requests #the required first parameter of the 'delete' method is the 'url': x = requests.delete('https://begtut.com/python/demopage.php') #print the response text (the content of the requested file): print(x.text)
➜ begtut>python demo_requests_delete.py
One record deleted.