How to call Cognitive Services APIs with R