I sign on to my system via SSO and am connected via VPN. If this is not possible with this approach, is it possible to run the GET command through Chrome and grab the XML and then parse as needed without manually going to Chrome? Thanks.
Code: Select all
oWhr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
oWhr.Open("GET", "https://MYSITE/_api/Web/Lists/GetByTitle('My Title')/items?ETC", false)
oWhr.SetRequestHeader("Content-Type", "application/json;odata=verbose")
oWhr.SetRequestHeader("Cookie", "my cookie")
oWhr.SetRequestHeader("Host", "host")
oWhr.SetRequestHeader("Referer", "referring site")
oWhr.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36")
oWhr.SetRequestHeader("X-Requested-With", "XMLHttpRequest")
oWhr.Send()
MsgBox, % oWhr.ResponseText