浅谈python requests 的put, post 请求参数的问题
作者:吕海洋 时间:2023-05-06 14:54:47
post, put请求的参数有两种形式
一种是把参数拼接在url中 对应postman
第二种是把参数放在body中 对应postman
在Python requests 库中
一般在的资料都会介绍 post,put请求的参数 用data 这种情况下参数会放在body中
但是有些接口参数通过body传入获取不到只能获取到URL中的参数 我们就需要用到 类似于get请求中的 params 传入参数
requests.post(url=url, params=data, verify=False, timeout=60)
用fiddler抓包查看 参数会直接在URL中
来源:https://blog.csdn.net/wuchenlhy/article/details/79637876
标签:python,requests,put,post
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
pymssql ntext字段调用问题解决方法
2022-04-22 06:55:06
SQLServer2005 XML数据操作代码
2024-01-27 11:50:17
解决Python3.8用pip安装turtle-0.0.2出现错误问题
2021-04-07 03:51:20
![](https://img.aspxhome.com/file/2023/9/87939_0s.jpg)
MySQL5.6解压版服务无法启动之系统错误1067问题
2024-01-14 18:20:46
![](https://img.aspxhome.com/file/2023/8/108918_0s.png)
python实现在遍历列表时,直接对dict元素增加字段的方法
2021-08-10 05:44:15
JavaScript中的函数声明和函数表达式区别浅析
2023-08-05 23:22:36
通过Python实现控制手机详解
2021-04-21 12:10:37
![](https://img.aspxhome.com/file/2023/2/69552_0s.png)
python编程测试电脑开启最大线程数实例代码
2023-07-07 12:19:46
![](https://img.aspxhome.com/file/2023/9/101449_0s.png)
python实现计算图形面积
2021-06-01 06:18:54
![](https://img.aspxhome.com/file/2023/7/75967_0s.jpg)
opencv之颜色过滤只留下图片中的红色区域操作
2021-04-03 19:15:28
![](https://img.aspxhome.com/file/2023/9/76919_0s.jpg)
CentOS 6.3下安装部署Oracle服务器图文教程
2024-01-13 12:16:32
![](https://img.aspxhome.com/file/2023/7/66087_0s.png)
浅谈Mysql tinyint(1)与tinyint(4)的区别
2024-01-14 10:10:39
laravel添加前台跳转成功页面示例
2023-11-20 15:22:18
python输入错误后删除的方法
2023-07-25 11:55:09
Python数字比较与类结构
2023-07-29 13:33:51
![](https://img.aspxhome.com/file/2023/3/125053_0s.png)
python读取excel数据绘制简单曲线图的完整步骤记录
2022-04-27 10:52:18
如何计算多个订单的核销金额
2024-01-26 17:56:31
![](https://img.aspxhome.com/file/2023/0/104140_0s.png)
MySQL查询缓存优化示例详析
2024-01-27 12:21:32
![](https://img.aspxhome.com/file/2023/9/109789_0s.jpg)
关于Python 解决Python3.9 pandas.read_excel(‘xxx.xlsx‘)报错的问题
2021-11-05 01:05:28
![](https://img.aspxhome.com/file/2023/6/80766_0s.png)
MySQL 去除重复数据实例详解
2024-01-24 13:21:53