我已关注this tutorial使用Python,Flask,SQLite和SQLAlchemy构建API。我可以在浏览器中成功点击localhost地址。但是,是否可以测试此连接并在其他地方产生所需的结果,例如JSFiddle?
我想使用此网址http://localhost:5000/dept/police
来检索所有工资键和值对
示例JSON
{
"data": [{
"department": "POLICE",
"name": "AARON, JEFFERY M",
"position": "POLICE OFFICER",
"salary": "$80778.00"
}, {
"department": "POLICE",
"name": "AARON, KARINA",
"position": "POLICE OFFICER",
"salary": "$80778.00"
}, {
"department": "POLICE",
"name": "ABBATE, TERRY M",
"position": "POLICE OFFICER",
"salary": "$86520.00"
}, {
"department": "POLICE",
"name": "ABBOTT, LYNISE M",
"position": "CLERK III",
"salary": "$43920.00"
}, {
"department": "POLICE",
"name": "ABDALLAH, ZAID",
"position": "POLICE OFFICER",
"salary": "$69684.00"
}, {
"department": "POLICE",
"name": "ABDELHADI, ABDALMAHD",
"position": "POLICE OFFICER",
"salary": "$80778.00"
}]
}