编程语言
首页 > 编程语言> > python3发送request请求基本实现

python3发送request请求基本实现

作者:互联网

1 airline_url = 'http://ws.webxml.com.cn/webservices/DomesticAirline.asmx/getDomesticAirlinesTime'
2 
3 headers = {'host': 'ws.webxml.com.cn', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'}
4 
5 airline_data = {'startCity': 'SHA', 'lastCity': '', 'theDate': '2019-08-30', 'userID': ''}
6 
7 response = requests.request(method='post', url=airline_url, headers=headers, data=airline_data)
8 
9 print(response.content.decode('utf-8'))

 

标签:cn,url,request,webxml,发送,headers,airline,data,python3
来源: https://www.cnblogs.com/shenwazaishenwa/p/11436630.html