我的python代码如下:
files = {
'image_url': (None, ''),
'image_content': (None, ''),
'filename': (None, ''),
'h1': (None, 'en'),
'bih': (None, '179'),
'biw': (None, '1600'),
'encoded_image': (None, open(file,'rb')),
}
response = requests.post('https://www.google.co.in/searchbyimage/upload', files=files, allow_redirects=True)
curl命令无效 curl -F encoded_image=@/path/to/image.jpg https://www.google.de/searchbyimage/upload
如何将此代码转换为flatterhttp或任何其他包(如dio)?
1条答案
按热度按时间kkbh8khc1#
导入
dio
包裹。