Requests库主要方法解析
1 """Requests库主要方法解析""" 2 3 4 import requests 5 6 kv = {'key1': 'value1', 'key2': 'value2'} 7 r = requests.request('GET', 'http://python123.io/', params=kv) 8 # https://python123.io/?key1=value1&key2=value2 9 print(r.url) 10 11 body = 'content' 12 r = requests.request('POST', 'http://python123.io', data=body)