Ich brauche eine Verbindung zu einem Webserver mit VBScript. Mit Powershell funktioniert das einwandfreie:http-basic-auth gegen Webserver mit Vbs
$url = "https://someserver:9200/?q=name:Hans"
$headers = @{ Authorization = "Basic c29tZXVzZXI6c29tZXBhc3M=" }
$result = Invoke-WebRequest -Uri $url -Method Post -Body $body -ContentType application/x-www-form-urlencoded -Headers $headers
Jetzt muss ich mit vbscript das gleiche tun:
url = "https://someserver:9200/?q=name:Hans"
Set xmlHttp = CreateObject("WinHTTP.WinHTTPRequest.5.1")
xmlHttp.Open "POST", url, false
xmlHttp.SetRequestHeader "Authorization", "Basic c29tZXVzZXI6c29tZXBhc3M="
xmlHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.send
Leider dies mir ein Fehler gibt:
A certificate is required to complete client authentication
Was mache ich falsch?
BeMod