Public Function httpGET(fn As String, _
Optional authUser As String = vbNullString, _
Optional authPass As String = vbNullString, _
Optional accept As String = vbNullString, _
Optional timeout As Long = 0) As String
pHtml = fn
Dim oHttp As Object
Set oHttp = CreateObject("MSXML2.ServerXMLHTTP")
If timeout = 0 Then timeout = 30
oHttp.SetTimeouts 0, 30 * 1000, 30 * 1000, timeout * 1000
Call oHttp.Open("GET", pHtml, False)
If (authUser <> vbNullString) Then
oHttp.SetRequestHeader "Content-Type", "application/json"
oHttp.SetRequestHeader "Accept", "application/json"
oHttp.SetRequestHeader "Authorization", "Basic " + _
Base64Encode(authUser + ":" + authPass)
End If
If accept <> vbNullString Then
oHttp.SetRequestHeader "Accept", accept
End If
Call oHttp.Send("")
httpGET = oHttp.ResponseText
pStatus = oHttp.status
Set oHttp = Nothing
End Function...