如何使用 Inetc 从网站请求纯 HTTP

How to request plain HTTP from a website using Inetc

Haya,目前我正在尝试解决我的代码中有关 SendRequest error 的问题,因为我相信我使用的网站 (https://www.gnu.org/licenses/gpl-3.0.txt) is not being validated as having a correct certificate by inetc or something close to this - i read here () 可以使用纯 http 来解决此问题。

我该怎么做?

您链接到的答案是旧的,INetC 现在支持 /WEAKSECURITY 开关。

要使用纯 HTTP,只需将 URL 中的 https: 部分更改为 http:。这并非在任何地方都有效,某些服务器可能会强制重定向到 HTTPS。

这对我有用:

Section
InitPluginsDir
inetc::get /WEAKSECURITY /SILENT "https://www.gnu.org/licenses/gpl-3.0.txt" "$PluginsDir\License.txt" /END
ClearErrors
FileOpen  "$PluginsDir\License.txt" r
IfErrors 0 +2
Abort "No file?"
loop:
    FileRead  
    IfErrors +3
    DetailPrint 
    Goto loop
FileClose 
SectionEnd