Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: pickle.load from gpu device to cpu 
Python :: how to plot side by side bar horizontal bar graph in python 
Python :: request login python 
Python :: python detect script exit 
Python :: use rectangular signal in python 
Python :: python build a string using reduce and concatenate 
Python :: An example of how to associate a color to each bar and plot a color bar 
Python :: Python - Sort Lists 
Python :: Python Try Except Else Clause 
Python :: datetime to epoch 
Python :: Python Difference between two timedelta objects 
Python :: gitlab-ci.yml for python project 
Python :: pythonhashseed 
Python :: how to remove axis in matplotlib 
Python :: flask or django 
Python :: recorrer lista desde el final python 
Python :: python sum certain postions of array 
Python :: python init dict by list 
Python :: py random.sample 
Python :: add space before and after string python 
Python :: using polymorphism in python 
Python :: python raise exception with custom message 
Python :: Fibonacci series up to n python 
Python :: python clear memory 
Python :: to_datetime with non zero padded values python 
Python :: last element of python list 
Python :: Object of type datetime is not JSON serializable 
Python :: how to create a spark schema using a string 
Python :: how can I print all items in a tuple, separated by commas? 
Python :: del df.loc 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =