应该用ResponseBody- Set Http = CreateObject("WinHttp.WinHttpRequest.5.1")
- MsgBox HttpGET("http://www.baidu.com/")
-
- Function HttpGET(URL)
- Http.Open "GET", URL, False
- Http.Send()
- Http.ResponseText()
- With CreateObject("adodb.stream")
- .mode=3
- .type=1
- .open
- .write Http.ResponseBody
- .position=0
- .type=2
- .charset="utf-8"
- HttpGET=.readText()
- .close
- End With
- End Function
复制代码 话说with这种写法真难看。。 |