此处将REST api改为在json上返回Web ui [英] HERE places REST apis returns web ui instead on json

查看:62
本文介绍了此处将REST api改为在json上返回Web ui的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估HERE Places API.但是,该URL确实返回网页而不是纯JSON作为响应.查询示例:

I am evaluating HERE places APIs. However, the url does return the web page instead of plain JSON as response. Example query:

https://places.cit.api.here.com/places/v1/autosuggest?app_id={YOUR_APP_ID}&app_code{YOUR_APP_CODE}&at=52.5304417,13.4111201&q=rest&pretty

我需要将响应作为简单的JSON,但无法在

I need the response as simple JSON but can't find any information on the documentation page.

推荐答案

答案是向URL添加回调参数.示例:

The answer is to add callback parameter to the url. Example:

https://places.cit.api.here.com/places/v1/autosuggest?app_id={YOUR_APP_ID}&app_code{YOUR_APP_CODE}&at=52.5304417,13.4111201&q=rest&pretty&callback=xyz

从文档中不清楚.我是从这里获得支持的.

It is not clear from the documentation. I got this information from HERE support.

这篇关于此处将REST api改为在json上返回Web ui的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆