I have a JSON:
url = 'https://your_php_server_url.com/php_endpoint'
payload = {
'full_name': the_name,
'phone_number': the_phone,
}
How can I send the json using POST in python?
Python side, you can use requests library:
import requests
url = 'https://your_php_server_url.com/php_endpoint'
payload = {
'full_name': the_name,
'phone_number': the_phone,
}
r = requests.post(url, json=payload)
print(r.text)