1
嗨我想在我的服务器上发起https请求。我如何包含https以获取响应?我要重新启动服务器,如果我得到一个HTTPS代码的结果是不是200。这里是我的源代码如何在https上包含https重启服务ping结果
@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?
我想忽略由于它运行在HTTPS的SSL事实错误