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'))

 

上一篇:java webserver-反射webxml


下一篇:关于WebService