惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
S
Schneier on Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
Recorded Future
Recorded Future
I
Intezer
云风的 BLOG
云风的 BLOG
博客园 - Franky
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
Tenable Blog
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Attack and Defense Labs
Attack and Defense Labs
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
The Cloudflare Blog
Webroot Blog
Webroot Blog
W
WeLiveSecurity
H
Heimdal Security Blog
博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
G
Google Developers Blog
O
OpenAI News
V
V2EX
罗磊的独立博客
博客园_首页
N
News | PayPal Newsroom
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
TaoSecurity Blog
TaoSecurity Blog
Cloudbric
Cloudbric
H
Hacker News: Front Page
博客园 - 叶小钗
T
Tor Project blog
AI
AI

博客园 - 木子东晓东

当androidStudio下载gradle出错时,切换到国内镜像的方法 DevEco Studio 调用hdc的方法 运行Flutter 真机运行安卓报错 将字符串数字转换为薪资类型10000转换为10,000 使用python 实现自动发送邮件功能,并上传到宝塔 py集成宝塔,flask已加入模块,无法实现自动发送邮件功能 谷歌浏览器降级的方法-及chromedriver 下载文件 若依框架导入阿里OSS报错问题解决方案 解决若依框架与tailwindcss 样式冲突问题 若依框架前期启动工作 运行若依时报错 MAC 使用docker 启动宝塔 MAC flutter初步学习 2 iOS 审核被拒,日志中找不到苹果返回的creashlog的解决办法 flutter学习之添加第三方应用 MAC flutter初步学习 python Django 连接数据库失败的解决方法 Python之学习菜鸟教程踩的坑 Python学习之环境搭建
使用magicAPI对接python 文件,上传参数获取不到回参问题
木子东晓东 · 2024-08-16 · via 博客园 - 木子东晓东

1、在python 文件中,创建post 请求

@app.route('/post_endpoint', methods=['POST'])

def handle_post_request():

# 从请求中获取JSON数据

data = request.form

# 打印接收到的数据(可选,用于调试)

print(data)

return jsonify(data), 200

 这个方法,是得到form-data返回的参数

 传什么,返回的是什么

@app.route('/post_endpoint', methods=['POST'])
def handle_post_request():
data = request.get_json()
if data is not None:
print(data)
return jsonify(data), 200
else:
return jsonify({'error': 'No JSON data provided'}), 400

使用get_json() 可以使用body 的方式上传参数

posted @ 2024-08-16 11:11  木子东晓东  阅读(276)  评论()    收藏  举报