Python HTTP POST

21.08.2020 - Записи в блоге

import requests

url = 'http://hostname:80/script.php'
my_post = {'key': key}
my_response = requests.post(url, data = my_post)
my_response.encoding = 'windows-1251'
my_html = my_response.text

 

› tags: charset / encoding / HTTP / POST / python /