Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Making a delete request using python

from requests_html import HTMLSession
session = HTMLSession()

url='https://httpbin.org/delete'
user_to_be_deleted ={
    "user":'alixaprodev'
}
response = session.delete(url, data=user_to_be_deleted)
print(f'Status Code:{response.status_code}')
print(f'Request Type : {response.request}')
  
## output  ##
# Status Code:200 
# Request Type : <PreparedRequest [DELETE]>Copy Code
Source by www.alixaprodev.com #
 
PREVIOUS NEXT
Tagged: #Making #delete #request #python
ADD COMMENT
Topic
Name
6+8 =