, URL, , HTTP - JSON API.
:
( )
Public Function getHTTP(ByVal url As String) As String
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", url, False: .Send
getHTTP = StrConv(.responseBody, vbUnicode)
End With
End Function
:
(, ), :
XML:
Tools & rarr; References & rarr; 🗹 Microsoft XML, v6.0 ( , )
: ( )
Dim msXML As XMLHTTP60
XML, :
Public Function getHTTP(ByVal url As String) As String
If msXML Is Nothing Then Set msXML = New XMLHTTP60
With msXML
.Open "GET", url, False: .Send
getHTTP = StrConv(.responseBody, vbUnicode)
End With
End Function
: (for either method)
HTML :
Debug.Print getHTTP("https://stackoverflow.com/q/817602")