如何使用 VBScript POST HTTPS 请求

发布于 2024-11-05 21:02:14 字数 66 浏览 0 评论 0原文

我想知道如何从 VBScript 客户端发出 HTTPS 请求。

收到请求后,如何解密HTTPS响应?

I want to know how to make a HTTPS request from a VBScript client.

After receiving the request, how to decrypt the HTTPS response?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷离° 2024-11-12 21:02:14
dim xHttp: Set xHttp = createobject("MSXML2.ServerXMLHTTP")

xHttp.Open "GET", "https://yourhost.example.com/foo", False

' 2 stands for SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS
' 13056 means ignore all server side cert error
xHttp.setOption 2, 13056
xHttp.Send

' read response body
WScript.Echo xHttp.responseBody

参考:

dim xHttp: Set xHttp = createobject("MSXML2.ServerXMLHTTP")

xHttp.Open "GET", "https://yourhost.example.com/foo", False

' 2 stands for SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS
' 13056 means ignore all server side cert error
xHttp.setOption 2, 13056
xHttp.Send

' read response body
WScript.Echo xHttp.responseBody

Reference:

苦行僧 2024-11-12 21:02:14

HTTPS 不仅仅是一种加密格式,它还是一种传输安全协议,内置复杂的协商。就像您不会尝试在 VBScript 中构建 HTTP 客户端组件一样,您也不会尝试构建 HTTPS/SSL 客户端。

VBScript 语言不包含任何 HTTP 或 HTTPS 客户端,但 Windows 有几个可以使用的 COM 对象(从 Windows Script Host 或从用 VBScript 编写的 ASP 页面),并且在 Internet Explorer 中运行的 VBScript 代码可以类似地访问允许 HTTPS 调用的浏览器对象。

在 Windows (WSH/ASP) 中,最好的对象通常是 MSXML2.ServerXmlHTTP,例如,请参阅此快速概述:http://www.developerfusion.com/article/3272/posting-form-data-to-a-web-page/2/

在 Internet Explorer 中,只要您不处理旧版本,最好的想法就是使用跨浏览器标准对象 XMLHttpRequest。以下页面为您提供了概述: http://www.jibbering.com/2002/4 /httprequest.html

所有这些 HTTP 客户端也支持 HTTPS。

HTTPS is not just an encryption format - it's a transport security protocol, with complex negotiation built-in. Just like you wouldn't try to build an HTTP client component in VBScript, similarly you wouldn't try to build an HTTPS/SSL client.

The VBScript language doesn't include any HTTP or HTTPS client, but windows has a couple of COM objects that can be used (from Windows Script Host of from ASP pages written in VBScript), and VBScript code running in internet explorer can similarly access a browser object that allows HTTPS calls.

From windows (WSH/ASP), the best object is typically MSXML2.ServerXmlHTTP, for example see this quick overview: http://www.developerfusion.com/article/3272/posting-form-data-to-a-web-page/2/

From Internet Explorer, as long as you're not dealing with legacy versions, the best idea is to use the cross-browser standard object XMLHttpRequest. The following page gives you an overview: http://www.jibbering.com/2002/4/httprequest.html

All of these HTTP clients also support HTTPS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文