sprogissd
sprogissd

Reputation: 3075

How to run delete webrequest using Python?

Currently, I use Powershell to clear cache using the following command:

Invoke-WebRequest https://url -method DELETE

How can I make my Python script do to the same type of delete web request?

Upvotes: 1

Views: 83

Answers (1)

sprogissd
sprogissd

Reputation: 3075

This seemed to work:

import requests
url = "https://myurl"
response = requests.delete(url)

Upvotes: 1

Related Questions