Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making an API post
#2
Run this command
python -m pip install requests
this will install requests lib.

Make a POST request to a web page, and return the response text:
import requests

url = 'https://www.w3schools.com/python/demopage.php'
myobj = {'somekey': 'somevalue'}

x = requests.post(url, data = myobj)

print(x.text)
Reply


Messages In This Thread
Making an API post - by python_moron - Apr-08-2021, 08:09 AM
RE: Making an API post - by kashcode - Apr-08-2021, 08:25 AM
RE: Making an API post - by buran - Apr-08-2021, 08:31 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020