Hi,

Code:
Public Enum WinHttpRequestOption
  WinHttpRequestOption_UserAgentString
  WinHttpRequestOption_URL
  WinHttpRequestOption_URLCodePage
  WinHttpRequestOption_EscapePercentInURL
  WinHttpRequestOption_SslErrorIgnoreFlags
  WinHttpRequestOption_SelectCertificate
  WinHttpRequestOption_EnableRedirects
  WinHttpRequestOption_UrlEscapeDisable
  WinHttpRequestOption_UrlEscapeDisableQuery
  WinHttpRequestOption_SecureProtocols
  WinHttpRequestOption_EnableTracing
  WinHttpRequestOption_RevertImpersonationOverSsl
  WinHttpRequestOption_EnableHttpsToHttpRedirects
  WinHttpRequestOption_EnablePassportAuthentication
  WinHttpRequestOption_MaxAutomaticRedirects
  WinHttpRequestOption_MaxResponseHeaderSize
  WinHttpRequestOption_MaxResponseDrainSize
  WinHttpRequestOption_EnableHttp1_1
  WinHttpRequestOption_EnableCertificateRevocationCheck
End Enum

Public Function GetUrl(szUrl As String) As String
    On Error Resume Next
    Dim Timeout As Long
    Timeout = 2000  'milliseconds
    Dim xhr As Object
    Set xhr = CreateObject("WinHttp.WinHttpRequest.5.1")
    'https://msdn.microsoft.com/en-us/library/windows/desktop/aa384108(v=vs.85).aspx
    xhr.Option(WinHttpRequestOption_EnableRedirects) = True                'true by default
    'xhr.Option(WinHttpRequestOption_EnableHttpsToHttpRedirects) = True     'false by default
    xhr.SetTimeouts Timeout, Timeout, Timeout, Timeout
    If xhr Is Nothing Then Set xhr = CreateObject("MSXML2.ServerXMLHTTP")
    If xhr Is Nothing Then Set xhr = CreateObject("Microsoft.XMLHTTP")
    If xhr Is Nothing Then Set xhr = CreateObject("WinHttp.WinHttpRequest")
    xhr.Open "GET", szUrl, False
    xhr.setRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0"
    xhr.setRequestHeader "Content-Type", "text/css" '"application/x-www-form-urlencoded"
    'xhr.setRequestHeader "Content-Length", Len(sEntityBody)
    On Error GoTo ErrorHandler:
    xhr.send 'URLEncode(sEntityBody)
    GetUrl = xhr.responseText
    Set xhr = Nothing
    Exit Function
ErrorHandler:
    'ErrorMsg Err, "GetUrl", szUrl
    'If inIDE Then Stop: Resume Next
End Function
debug.? GetUrl("https://raw.githubusercontent.com/dragokas/hijackthis/devel/src/HiJackThis-update.txt")
is work.

debug.? GetUrl("https://github.com/dragokas/hijackthis/raw/devel/src/HiJackThis-update.txt")
is not work (return 0x80072F7D).

Thanks,
Alex.