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

推荐订阅源

T
Threatpost
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security Affairs
N
News and Events Feed by Topic
T
Tenable Blog
P
Proofpoint News Feed
W
WeLiveSecurity
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
Help Net Security
Help Net Security
I
Intezer
T
Threat Research - Cisco Blogs
S
Secure Thoughts
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
AWS News Blog
AWS News Blog
Google Online Security Blog
Google Online Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Project Zero
Project Zero
The Hacker News
The Hacker News
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Tor Project blog
N
News | PayPal Newsroom
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
Arctic Wolf
Forbes - Security
Forbes - Security
O
OpenAI News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Latest
Security Latest
P
Palo Alto Networks Blog
S
Schneier on Security
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
H
Heimdal Security Blog
V
Vulnerabilities – Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园_首页
T
Troy Hunt's Blog
Latest news
Latest news
Recent Announcements
Recent Announcements
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
L
LINUX DO - 热门话题
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
V
Visual Studio Blog
H
Hacker News: Front Page

博客园 - 木子东晓东

当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)  评论()    收藏  举报