Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Make a post request in python

from requests_html import HTMLSession
session = HTMLSession()
# url to make a post request to
url='https://httpbin.org/post'
post_user ={
    "user":'alixaprodev',
    "pass":'password'
}
# making post request
response = session.post(url, data=post_user)
print(f'Content of Request:{response.content} ')
print(f'URL : {response.url}')

## output  ##
# Content of Request:b'{ 
  "form": {
    "pass": "password", 
    "user": 
#"alixaprodev"
  }
# URL : https://httpbin.org/postCopy Code
Source by www.alixaprodev.com #
 
PREVIOUS NEXT
Tagged: #Make #post #request #python
ADD COMMENT
Topic
Name
7+7 =