标签:time requests 其他 ams log .post cookie headers 类型
基本 GET 请求
requrests.get(url)
# 添加参数
requests.get(url,params=payload)
基本 POST 请求
requests.post(url,data=payload)
其他类型的请求
r = requests.put(url) r = requests.delete(url) r = requests.head(url) r = requests.options(url)
添加 header
requests.get(url,headers=headers)
添加 cookies
requests.get(url,cookies=cookies)
设置超时(s)
requests.get(url,timeout=30)
标签:time requests 其他 ams log .post cookie headers 类型
原文地址:http://www.cnblogs.com/hisheng/p/6607331.html