【发布时间】:2011-11-07 10:32:30
【问题描述】:
我想执行来自 MS-access 的隐藏 HTTP-GET 请求,
尽可能简单,没有任何额外的库/组件。
只需一个简单的声明即可。
WinHttp 离开大楼了吗??
【问题讨论】:
-
你看过这个帖子吗:stackoverflow.com/questions/158633/…?
我想执行来自 MS-access 的隐藏 HTTP-GET 请求,
尽可能简单,没有任何额外的库/组件。
只需一个简单的声明即可。
WinHttp 离开大楼了吗??
【问题讨论】:
这里有一个great page 关于那个。
【讨论】:
希望对你有帮助
Dim xhr As Object
Dim webServiceURL As String
Dim actionType As String
Dim thisRequest As String
Dim targetWord As String
WebServiceURL = "http://services.aonaware.com/DictService/DictService.asmx/"
actionType = "Define?word="
targetWord = "Marketplace"
thisRequest = webServiceURL & actionType & targetWord
'use late binding
Set xhr = CreateObject("Microsoft.XMLHTTP")
xhr.Open "GET", thisRequest, False
xhr.Send
If xhr.status = 200 Then
Debug.Print xhr.responseText
MsgBox xhr.getAllResponseHeaders
Else
MsgBox xhr.status & ": " & xhr.statusText
End If
Set xhr = Nothing
【讨论】: