根据Yelp文档,我使用Yelp提供的client_id和client_secret在邮递员中打了一个“POST”电话,并接收了一个访问令牌。此访问令牌可用于验证api调用。在获得访问令牌之后,我使用Postman对/ business /search端点进行' get‘调用,并获取相关的业务信息。Postman还有一个特性来生成调用所需的代码,我将生成的ajax请求插入到我的程序中:
请帮助找出以JSON格式返回结果的Bing搜索请求的参数。文档“迁移BingSearchAPI应用程序”告诉我们:
To authenticate a BingSearchAPI request with Windows Azure MarketplaceThis mode of authentication replaces the AppID used in the BingSearchAPI
我将向Bing搜索API发送ajax请求。当我将请求放在浏览器中时,用于请求的URL可以工作。使用ajax,我得到了一个401错误"The authorization type you provided is not supported./Bing/Search/v1/Composite?$scope.searchresult = searchresults;