【发布时间】:2017-02-11 06:44:40
【问题描述】:
如何拦截 REST-connector 执行以格式化来自 REST API 连接器的响应?
我在 datasources.json 文件中添加了“新闻”:
{
"file": {
"name": "file",
"localStorage": "",
"file": "memory.db.json",
"connector": "memory"
},
"news": {
"name": "news",
"crud": false,
"debug": true,
"connector": "rest",
"options": {
"strictSSL": false
}
}
}
我在 mode-config.json 文件中将此连接器与我的模型绑定
{
"_meta": {
...
},
"publication": {
"dataSource": "news",
"public": true
}
}
这行得通。现在,如何格式化新闻 Rest API 提供的响应?
不知道loopback documentation提供的解决方案在哪里编码
谢谢。
【问题讨论】:
标签: rest strongloop connector loopback