您好我想在我的服务器上发送https请求。如何包含https以获得响应?如果我的https代码结果不是200,我想重新启动服务器。这是我的源代码
@set @x=0 /*
:: ChkHTTP.cmd
@echo off
setlocal
set "URL=https://localhost:8080/ping.xhtml"
cscript /nologo /e:jscript "%~f0" %URL% | find "200" > nul
echo going to check error
if %ErrorLevel% EQU 0 (
echo Web server ok
) else (
echo Weber server not ok
echo kill task and then restart service
)
JScript */
var x=new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
x.setOption(2,13056);
x.open("GET",WSH.Arguments(0));x.send();
while (x.ReadyState!=4) {WSH.Sleep(15000)};
WSH.Echo(x.status);
它会在运行前等待15秒。但如果它的https?
它会永远运行我想忽略SSL错误