Open mlipok opened 6 months ago
Hi @mlipok , since you use the same code block ...
If @error Then
Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("GET", $sURL, False)
$oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0")
$oHTTP.Send("")
$sName = $oHTTP.ResponseBody
EndIf
... three times (for $sResult
, $sData
and $sDriverLatest
), it would maybe be a good improvement to extract this code into a separate "internal usage" function π .
Best regards Sven
I expected such request. Will do it ASAP.
No pressure @mlipok , thanks for your stable contribution actions on this project π .
Cool, thanks @mlipok . I try to test it in the next day(s). Because I believe, the @error
marcro could be a problem - but it's only a wild guess and feeling, no real statement. Let me test it π€ .
Is there functionality from WinHttp.au3 that could be used here instead of WinHttp.WinHttpRequest.5.1?
This is actually a really good question @Danp2. Interesting.
- Do we need to support both InetRead and WinHttp downloads?
Do not know.
- Is there functionality from WinHttp.au3 that could be used here instead of WinHttp.WinHttpRequest.5.1?
I think yes. But I'm not familiar with winhttp.au3 udf.
- Do we need to support both InetRead and WinHttp downloads?
Do you mean to stop using InetRead
in favor of WinHTTP functions ?
- Is there functionality from WinHttp.au3 that could be used here instead of WinHttp.WinHttpRequest.5.1?
I think yes. But I'm not familiar with winhttp.au3 udf.
maybe from here: https://www.autoitscript.com/forum/topic/199088-download-a-zip-file-using-winhttp/?do=findComment&comment=1428601 https://www.autoitscript.com/forum/topic/174063-winhttp-download-an-exe-file/?do=findComment&comment=1259515
also some of my old attempts: https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/?do=findComment&comment=1490309
Pull request
Proposed changes
Today I hit a problem when trying to update geckodriver where InetRead() returns with error
Checklist
Types of changes
What is the current behavior?
Sometimes InetRead and InetGet can return error thus there is no way to update driver with this udf.
What is the new behavior?
when
InetRead
returns error thenWinHttp.WinHttpRequest.5.1
is used.Influences and relationship to other functionality
none
Additional context
https://www.autoitscript.com/forum/topic/209621-inetget-alernative/ https://www.autoitscript.com/forum/topic/209610-inetget-dont-download-some-pages-since-ie11-is-no-longer-supported-by-some-sites https://www.autoitscript.com/forum/topic/209472-download-problem-with-inetget/
System under test
FireFox