)
# data 为元组列表
tulp_data = (('name', 'coco'), ('age', 12))
post(url, data=tulp_data)
# 接收json数据
post...value'})
delete
delete(url, **kwargs)
delete('http://httpbin.org/delete')
request
基础请求函数, 其他请求方法都是该方法的包装函数...'server_error', '/o\\', '✗'),
501: ('not_implemented',),
502: ('bad_gateway',),
503: ('service_unavailable...BDORZ': '27315'}
print(r.cookies.get('BDORZ'))
# 27315
history 历史记录
Requests 将自动处理重定向, history 收集了重定向的请求体...r = get(url,cookies=cookies)
print(r.history)
# []
# 无重定向时,列表为空
timeout 请求超时
# 设置请求超时时长
get('http://