【发布时间】:2017-02-20 03:37:45
【问题描述】:
我想问一下您是否知道如何在环回 REST 连接器查询中复制参数。 我有以下代码:
details: {
'template': {
'method': 'GET',
'debug': true,
'url': 'https://www.example.com/data',
'timeout': 10000,
'headers': {
'Authorization': 'Bearer {token}'
},
'query': {
q: 'PHOTOS'
q: 'DETAILS',
id: '{id}'
},
'options': {
'useQuerystring': true
},
'responsePath': '$'
},
'functions': {
'searchData': [
'token',
'id'
]
}
}
问题在于,环回似乎用最后一个参数覆盖了参数 q 的值,因为我只得到最后一个参数的信息。
知道怎么解决吗?
提前谢谢你。
【问题讨论】:
标签: javascript node.js rest loopbackjs strongloop