requests-toolbelt处理multipart/form-data

判断场景:

1、content-type : multipart/form-data

2、表单webforms为下图所示:

 

 3、接口文档

使用:

pip install requests-toolbelt

pip install requests-toolbelt --index-url https://pypi.douban.com/simple

就是这种类型的data数据应是如下格式,

请求时在headers中赋值 : headers={'Content-Type': m.content_type}

原文地址:https://www.cnblogs.com/dearddu/p/12521407.html