Aaron Selonke10,323 Points
How did she know we only needed the URL string and the key to perform the request?
In the video the Bing API example request looks like this
GET https://api.cognitive.microsoft.com/bing/v5.0/news/search?q=sailing+dinghies&mkt=en-us HTTP/1.1 Ocp-Apim-Subscription-Key: 123456789ABCDE User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 822) X-Search-ClientIP: 999.999.999.999 X-MSEdge-ClientID: <blobFromPriorResponseGoesHere> Host: bingapis.azure-api.net
Carling, says that we only need the URL string and the key. How did she know that? Without the video I might have been poking around at the docs for an hour before knowing where to begin..
Also, as a followup question This API is using a GET request... When we are working with Webclient does it matter if the APIs we is are making a GET or POST?
Jeremy McLainTreehouse Guest Teacher
It sometimes takes a bit to become familiar with documentation. Also Cognitive API is just one API of many in Bing. They all work on the same principles. I'd read more about the Bing APIs in general.
Yes. POST and GET are two different verbs and it almost always matters which one you use.