Code: Select all
global whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
f() {
whr.Open(...)
whr.SetRequestHeader(...)
whr.Send(...)
whr.WaitForResponse(...)
...
}
Maybe it's caused by multiple f function calls? Or it's because whr is a global variable?
It's very hard to debug an error when it occurs so rare and I don't know by what circumstances it's caused. Nevertheless an error message always points the line with whr.SetRequestHeader(...) call.