![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python+request自动化
u011159607
这个作者很懒,什么都没留下…
展开
-
json.loads
import json import requests payload={ 1:1,2:2 } r=requests.post("http://httpbin.org/post",data=payload) #因为r.content不是字典格式不好取值,所以转换成字典格式 r1=json.loads(r.content.decode('utf8')) #注意:utf8 不是utf-8 ...原创 2020-03-14 00:22:23 · 520 阅读 · 0 评论 -
contents
原创 2020-03-13 23:51:46 · 149 阅读 · 0 评论 -
xml格式消息体
原创 2020-03-13 22:06:46 · 791 阅读 · 0 评论 -
python接口自动化1-发送get请求 request
https://www.cnblogs.com/yoyoketang/p/6810643.html 准备工作: 1、下载python安装。 https://www.python.org/downloads/release/python-351/ 一路next,安装成功后 搜索栏输入“idle”就可以编写Python了,或者打开cmd命令页面,输入Pytho...转载 2018-12-10 18:05:28 · 1347 阅读 · 0 评论 -
python接口自动化2-发送post请求
payload参数是字典类型,传到如下图的form里 import requests payload={'yoyo':"hello world","pythonQQ群":"226296743"} #注意是冒号不是==等号,注意是大括号不是dict r= requests.post('http://httpbin.org/post',data=payload) print(r.text) ...转载 2019-07-03 16:58:04 · 446 阅读 · 0 评论 -
python requests提示警告InsecureRequestWarning
Python3中使用以下代码报错: import requests response = requests.get(url='', verify=False) 错误代码如下: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate v...转载 2019-07-04 11:58:58 · 1551 阅读 · 1 评论