import requests import json url = "http://website" headers = {"Content-Type":"application/json"} pyload = {"content":3} response = requests.post(url, data=json.dumps(pyload), headers=headers).text