当前位置:网站首页>Get webkitformboundary post login
Get webkitformboundary post login
2022-07-07 20:10:00 【nongcunqq】
Key points post when headers in boundary and data Medium boundary The data should be consistent 'Content-Type': f'multipart/form-data; boundary=----{web_boundary}',
Random generation 16 Bit case letters + Numbers
import requests
import random,string
from requests_toolbelt import MultipartEncoder
fields = {
'file': ('test.png', your_data, "image/png"),
'file_id': "0"
}
boundary = '----WebKitFormBoundary' \
+ ''.join(random.sample(string.ascii_letters + string.digits, 16))
m = MultipartEncoder(fields=fields, boundary=boundary)
headers = {
"Host": "xxxx",
"Connection": "keep-alive",
"Content-Type": m.content_type
}
req = requests.post('https://xxxx/api/upload', headers=headers, data=m)
print(req.text)
Reference resources
https://stackoverflow.com/questions/51349340/recreate-post-request-with-webkitformboundary-using-pythons-requests
边栏推荐
- Some arrangements about oneself
- Training IX basic configuration of network services
- Some important knowledge of MySQL
- JVM class loading mechanism
- 831. KMP string
- SQL common optimization
- R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize the violin diagram, set the palette parameter to customize the filling color of violin diagrams at different
- Force buckle 1037 Effective boomerang
- School 1 of vulnhub
- 【Auto.js】自动化脚本
猜你喜欢
Ways to improve the utilization of openeuler resources 01: Introduction
LeetCode_7_5
Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim
vulnhub之tre1
力扣 599. 两个列表的最小索引总和
Dynamic addition of El upload upload component; El upload dynamically uploads files; El upload distinguishes which component uploads the file.
9 atomic operation class 18 Rohan enhancement
使用高斯Redis实现二级索引
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
Cloud component development and upgrading
随机推荐
力扣 1961. 检查字符串是否为数组前缀
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
mock. JS returns an array from the optional data in the object array
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
MIT science and technology review article: AgI hype around Gato and other models may make people ignore the really important issues
R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
Force buckle 599 Minimum index sum of two lists
Force buckle 459 Duplicate substring
Vulnhub's funfox2
Force buckle 2315 Statistical asterisk
干货分享|DevExpress v22.1原版帮助文档下载集合
Semantic slam source code analysis
Force buckle 1790 Can two strings be equal by performing string exchange only once
ASP.NET学习& asp‘s one word
开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize the violin diagram, set the palette parameter to customize the filling color of violin diagrams at different
【STL】vector
vulnhub之school 1
Throughput
pom.xml 配置文件标签作用简述