我已经检查了很多代码片段,但我无法了解如何仅使用 python 2.4 在单个请求中发布多部分文本和二进制文件? 这里在评论中提到了一些关于 BytesIO 类的内容,但在 2.4 中不存在。 (纯Python,没有第三方库)谢谢。
I already checked a lot of code snippets but i could not get how to post multipart both text and binary files in single request with only python 2.4? Here in comments mentioned something about BytesIO class but is not present in 2.4. (plain python, no third-party libraries) Thanks.
发布评论
评论(1)
使用Python 2.6,您可以使用请求库,这是从 文档:
with Python 2.6 you can use requests library, here is snippet extracted from the documentation: