我有这个功能,但 zomato 继续将其返回为 403(无效的 API)。我不确定是否需要其他功能/参数来填充用户密钥
url='https://developers.zomato.com/api/v2.1/search?count=50&lat=111&lon=111&radius=1500&order=desc'
sendGetRequest() {
const headers = new HttpHeaders()
.set('cache-control', 'no-cache')
.set('content-type', 'application/json')
.set('user-key', 'mykeygoeshere')
return this.httpClient
.get(this.url, '', { headers: headers })
.subscribe(res => res.json);
}