activex not working (wodHttpDLX)
Hi
I don't have a problem with the content. The same content is working with MSXML2.ServerXMLHTTP.6.0 Object
I have a problem with wodHttpDLX parameters
Complete Working Code:
Dim httpRequest
Set httpRequest = CreateObject("MSXML2.ServerXMLHTTP.6.0")
httpRequest.SetOption 2, 13056
httpRequest.Open "POST", "https://openapi.taxes.gov.il/shaam/tsandbir/longtimetoken/oauth2/token", True
httpRequest.setRequestHeader "AUTHORIZATION:", "BASIC ZjM1MGIyNGIwOWQ2NTRkZD="
httpRequest.setRequestHeader "Content-Type:", "application/x-www-form-urlencoded"
httpRequest.Send "grant_type=authorization_code&code=AAN-BzaeOhP-"
Do While httpRequest.readyState <> 4
httpRequest.waitForResponse (1)
Loop
msgBox httpRequest.status
msgBox httpRequest.responseText
Not Working:
wodHttpDLX1.Hostname = "https://openapi.taxes.gov.il"
wodHttpDLX1.Request.Headers.Add "AUTHORIZATION:", "BASIC ZjM1MGIyNGIwOWQ2NTRkZD="
wodHttpDLX1.Request.Headers.Add "Content-Type", "application/x-www-form-urlencoded"
wodHttpDLX1.Request.Body ="grant_type=authorization_code&code=AAN-BzaeOhP-"
wodHttpDLX1.Post "/shaam/tsandbir/longtimetoken/oauth2/token"
msgBox wodHttpDLX1.Response.StatusCode
msgBox wodHttpDLX1.Response.Body