用于 POST 多部分/表单数据编码数据的 Python 标准库 [英] Python standard library to POST multipart/form-data encoded data

查看:30
本文介绍了用于 POST 多部分/表单数据编码数据的 Python 标准库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布多部分/表单数据编码的数据.我找到了一个外部模块:http://atlee.ca/software/poster/index.html但是我宁愿避免这种依赖.有没有办法使用标准库来做到这一点?

I would like to POST multipart/form-data encoded data. I have found an external module that does it: http://atlee.ca/software/poster/index.html however I would rather avoid this dependency. Is there a way to do this using the standard libraries?

谢谢

推荐答案

标准库目前不支持.有食谱,其中包括一段相当短的但是,您可能只想复制代码,以及对替代方案的长时间讨论.

The standard library does not currently support that. There is cookbook recipe that includes a fairly short piece of code that you just may want to copy, though, along with long discussions of alternatives.

这篇关于用于 POST 多部分/表单数据编码数据的 Python 标准库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆