|
sub zt()
Dim xhr As Object
Dim url As String
Dim responseText As String
url = "https://flash-api.xuangubao.cn/api/pool/detail?pool_name=limit_up"
Set xhr = CreateObject("MSXML2.XMLHTTP.6.0") ' CreateObject("MSXML2.XMLHTTP") '
With xhr
.Open "GET", url, False
' .setRequestHeader "Accept -Encoding", "gzip , deflate"
' .setRequestHeader "Accept -Language", "zh -cn"
' .setRequestHeader "Connection", "Keep -Alive"
' .setRequestHeader "Host", "flash -api.xuangubao.cn"
' .setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"
' .setRequestHeader "Content-Type", "application/json; charset=UTF-8"
.send
jsonData = .responseText
End With
end sub
运行到 .send 时总是提示未找到指定资源
请老师们指教一下,这个如何解决,谢谢!
|
|