【发布时间】:2026-02-05 07:35:01
【问题描述】:
假设用户提供了卡和电话并拥有有效的 Azure 帐户。创建了免费层级服务。 (有密钥和端点,类似于 xyz.cognitiveservices.azure.com/bing/v7.0
使用免费套餐(每秒 3 个搜索者,每月最多)(见此处https://azure.microsoft.com/en-us/pricing/details/cognitive-services/)
是 GET 还是 POST 调用,正确的标头参数是什么? 他们只有不工作的 Python 示例。 https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/quickstarts/python
问题是如何在 R 中做到这一点。
此代码不起作用
library(httr)
token='xxxxx'
server='https://xxxxx.cognitiveservices.azure.com/bing/v7.0/'
url=paste0(server,'search')
response = GET(url = url,
authenticate('',token, type = 'basic'))
response
res = content(response, encoding = 'json')
【问题讨论】: