首页 > 编程语言 > 详细

python3发送request请求基本实现

时间:2019-08-30 21:11:10      阅读:266      评论:0      收藏:0      [点我收藏+]
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))

 

python3发送request请求基本实现

原文:https://www.cnblogs.com/shenwazaishenwa/p/11436630.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!