Forms Python 3中的多部分表单编码文件上载

Forms Python 3中的多部分表单编码文件上载,forms,post,python-3.x,multipart,Forms,Post,Python 3.x,Multipart,我想知道在Python3中是否可以使用enctype='multipart/formdata'发布到表单。我环顾四周,只能找到Python2的东西(比如海报)。使用,它支持Python3 import requests response = requests.post('http://httpbin.org/post', files={'file': open('filename','rb')}) print(response.content) 使用时,它支持python 3 import

我想知道在Python3中是否可以使用
enctype='multipart/formdata'
发布到表单。我环顾四周,只能找到Python2的东西(比如海报)。

使用,它支持Python3

import requests

response = requests.post('http://httpbin.org/post', files={'file': open('filename','rb')})
print(response.content)
使用时,它支持python 3

import requests

response = requests.post('http://httpbin.org/post', files={'file': open('filename','rb')})
print(response.content)