当前位置:网站首页>flask-restplus接口地址404问题
flask-restplus接口地址404问题
2022-08-10 10:48:00 【华为云】
问题:
书写 仪表盘的图表配置信息保存 操作的接口时,想通过querystring 的方式来获取id值,因此定义 的接口 路由是
/api/dashboard/chart/handle/?id=int:id
这样的 路由地址,其中 int:id 这里是必需要传递的一个value 值,通过这样的方式来获取到id值,但在使用过程中,请求该接口,一直返回404.
解决:
使用flask-restplus 书写接口,querystring 并不需要在路由中定义,只需要标识querystring 是必填的即可,同时需要注意 路由需要以 / 结尾 即修改成
/api/dashboard/chart/handle/
在请求接口时在后面添加上querystring key value 值即可。
边栏推荐
- 兼容移动和PC的loading加载和toast消息插件
- Hangdian Multi-School-Loop-(uncertainty greedy + line segment tree)
- OneFlow源码解析:算子指令在虚拟机中的执行
- POJ 1026 Cipher (Permutation Groups)
- 4 面拿华为 offer 的水平,面试阿里居然一面就被吊打?
- Emulate stm32 directly with proteus - the programmer can be completely discarded
- 中小规模网站架构
- 三相380V整流后的电压
- Get started quickly and conquer three different distributed architecture calling schemes
- 【勇敢饭饭,不怕刷题之链表】链表中有环的问题
猜你喜欢

谷歌数据中心发生“电力事故”造成 3 人受伤

第3章-线性方程组(3)

In August the DB list latest scores - database Engines

Cybersecurity Notes 5 - Digital Signatures

3D rotating text animation js special effects

js guessing game source code

干货!ASSANet:让PointNet++更快更强

"MySQL Advanced Chapter" 6. Principles of index creation and design

自动化测试及Selenium

leetcode:334. 递增的三元子序列
随机推荐
Store limited time seckill function system
Redis6(一)——NoSQL数据库简介与Redis的安装
Redis(六)——Redis6的事务和锁机制(未完成,待补)
第二十二章 源代码文件 REST API 参考(四)
什么是抽象类
bus event bus use
3 injured in 'electrical accident' at Google data center
让软件飞——“X+”技术揭秘
组合模式:Swift 实现
Double.doubleToLongBits() method uses
owl.carousel poster card Slider carousel switch
bus事件总线 使用
[Microservice Architecture] Microservices and SOA Architecture (2)
Kyligence 通过 SOC 2 Type II 审计,以可信赖的企业级产品服务全球客户
杭电多校-Loop-(不确定性贪心+线段树)
【勇敢饭饭,不怕刷题之链表】有序链表的合并
从产品维度来看 我们为什么不能完全信任Layer2?
Several small projects that I have open sourced over the years
MongoDB database notes
POJ 2891 Strange Way to Express Integers (Extended Euclidean)