requests提供的get方法,有几个常用的参数

requests提供的get方法,有几个常用的参数:
url:显而易见,就是接口的地址url啦
headers:定制请求头(headers),例如:content-type = application/x-www-form-urlencoded
params:用于传递测试接口所要用的参数,这里我们用python中的字典形式(key:value)进行参数的传递。post请求这个参数为data
timeout:设置接口连接的最大时间(超过该时间会抛出超时错误)
posted @ 2020-12-23 14:15  sriver_dl  Views(2422)  Comments(0Edit  收藏  举报