Assuming user provided card and phone and has valid Azure account. Created a free tier service. (has key and endpoint, something like xyz.cognitiveservices.azure.com/bing/v7.0
Using free tier (3 searchers per second and max per month or so) (see here https://azure.microsoft.com/en-us/pricing/details/cognitive-services/ )
Is it a GET or POST call and what are the right header parameters? They only have Python example that is not working. https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/quickstarts/python
The questions is how to do it in R.
This code does not work
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')