如何搭建Pthon接口测试环境-创新互联
创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!

小编给大家分享一下如何搭建Pthon接口测试环境,希望大家阅读完这篇文章后大所收获,下面让我们一起去探讨吧!
环境搭建
python 安装:建议使用python3.7
pycharm安装
requests安装 :pip3 install requests
requests 基本使用
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> r.status_code
200
>>> 'Python is a programming language' in r.content
True
... or POST:
>>> payload = dict(key1='value1', key2='value2')
>>> r = requests.post('https://httpbin.org/post', data=payload)
>>> print(r.text)
{
...
"form": {
"key2": "value2",
"key1": "value1"
},
...
} 网站栏目:如何搭建Pthon接口测试环境-创新互联
标题链接:http://www.jxjierui.cn/article/eicps.html


咨询
建站咨询
