首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从vba执行隐藏的http-request

从vba执行隐藏的http-request
EN

Stack Overflow用户
提问于 2011-08-31 16:29:21
回答 2查看 9.6K关注 0票数 2

我想从MS-access执行一个隐藏的HTTP-GET请求,尽可能简单,不需要任何额外的库/组件。

只需简单地声明所有需要的内容。

WinHttp离开大楼了吗??

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-08-31 17:28:11

这里有一个关于这方面的great page

票数 6
EN

Stack Overflow用户

发布于 2016-08-05 14:54:37

希望这能有所帮助

代码语言:javascript
复制
 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
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7254420

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档