#POST请求的数据保存在表单中dict
#利用字典dict = {'what':'flag'}可以达到这一要求
from urllib import request,parse
url = "http://123.206.87.240:8002/post/"
headrs = {
'User-Agent':"Mozilla/4.0 (compatible; MSIE 5.5;Windows NT)",
'Host':'httpbin.org'
}
dict = {'what':'flag'}
data = bytes(parse.urlencode(dict),encoding='utf8')
req = request.Request(url=url,data=data,headers=headrs,method='POST')
response = request.urlopen(req)
print(response.read().decode('utf-8'))