I'll keep it short:
Code: Select all
_download_to_var(url){
req:=comobjcreate("WinHttp.WinHttpRequest.5.1")
;~ https://msdn.microsoft.com/en-us/library/windows/desktop/aa383989(v=vs.85).aspx
req.open("GET",url) ;~ <= Returns nothing, every time, regardless if url is resolved...
req.send() ;~ <= Error if "url" could not be resolved...
;~ ...
What's the best way to add a fail-safe so that if the URL doesn't exist it returns false or exits before send()? I could use comobjerror(), I suppose? I'm primarily looking for speed, as I'll be doing multiple back-to-back requests.
Thanks in advance.