使用python发送get请求

前言

做接口自动化需要使用python发送请求,需要安装第三方模块requests实现发送get\post等请求

1.安装 requests

执行命令 pip install xx 是python的安装命令

2.发送get请求

 默认返回的是状态码

如果需要查看内容 使用res.text属性

猜你喜欢

转载自www.cnblogs.com/yyzf/p/13181988.html