VBA using HttpClient to connect to an external REST API

匿名 (未验证) 提交于 2019-12-03 01:34:02

问题:

I'm reading on some old posts that in order to connect the VBA code to an external REST API, you need to import the reference "Microsoft WinHTTP Services" and use the following code:

 Set req = CreateObject("WinHttp.WinHttpRequest.5.1") 

Or Import a different reference and use the following code:

 Set objHTTP = CreateObject("MSXML2.XMLHTTP") 

These are old posts (2006, 2009) and I wonder if today (2014) Microsoft has provided something similar to HttpClient like they did for C#, VB.Net, C++

Question:
What is the recommended way in VBa (Excel 2013) to connect to an external REST API?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!