当前位置:网站首页>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
边栏推荐
- ASP. Net learning & ASP's one word
- Kubernetes——kubectl命令行工具用法详解
- ASP. Net gymnasium integrated member management system source code, free sharing
- Cuda版本不一致,编译apex报错
- Ways to improve the utilization of openeuler resources 01: Introduction
- 九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
- Simulate the implementation of string class
- 多个线程之间如何协同
- 九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
- 【STL】vector
猜你喜欢

九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!

【哲思与实战】程序设计之道

使用高斯Redis实现二级索引

Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记

Opencv学习笔记 高动态范围 (HDR) 成像

Cloud component development and upgrading

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
Make this crmeb single merchant wechat mall system popular, so easy to use!

整型int的拼接和拆分

Vulnhub tre1
随机推荐
Compiler optimization (4): inductive variables
pom. Brief introduction of XML configuration file label function
Force buckle 1037 Effective boomerang
Sword finger offer II 013 Sum of two-dimensional submatrix
R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
ASP.NET学习& asp‘s one word
RESTAPI 版本控制策略【eolink 翻译】
机器学习笔记 - 使用Streamlit探索对象检测数据集
JVM class loading mechanism
开源OA开发平台:合同管理使用手册
openEuler 资源利用率提升之道 01:概论
Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!
MIT science and technology review article: AgI hype around Gato and other models may make people ignore the really important issues
Cloud 组件发展升级
Flink并行度和Slot详解
力扣 2315.统计星号
Boot 和 Cloud 的版本选型
多个线程之间如何协同
力扣 1037.有效的回旋镖
Interpretation of transpose convolution theory (input-output size analysis)