My VFP application needs to use a REST service to connect to another application and import some data.
I am able to establish a connection and get the response back. But I don't know how to parse the JWT-token.
Here is my code.
Contacting the server
oXMLHttpRequest = CreateObject("MSXML2.XMLHTTP.6.0")
oXMLHttpRequest.open("POST", "my url", null)
oXMLHttpRequest.setRequestHeader("Content-Type", "application/x-
oXMLHttpRequest.send("username=murugu&password=mmmm")
result = oXMLHttpRequest.ResponseBody &&saved the response
?oXMLHttpRequest.status - This returned 200
Passing the returned jwt-token
oXMLHttpRequest.open("GET","my url")
oXMLHttpRequest.setRequestHeader("Content-Type", "text/xml")
oXMLHttpRequest.setRequestHeader("Content-Type", "application/json")
oXMLHttpRequest.setRequestHeader("Authorization", "AR-JWT<result>") &&passing the saved value
oXMLHttpRequest.Send()
Received "Not able to parse Authorization Header parameter." message.
I am old school, don't know much about web services. Could anyone please assist me with this?
Thanks - Ganga
I am able to establish a connection and get the response back. But I don't know how to parse the JWT-token.
Here is my code.
Contacting the server
oXMLHttpRequest = CreateObject("MSXML2.XMLHTTP.6.0")
oXMLHttpRequest.open("POST", "my url", null)
oXMLHttpRequest.setRequestHeader("Content-Type", "application/x-
oXMLHttpRequest.send("username=murugu&password=mmmm")
result = oXMLHttpRequest.ResponseBody &&saved the response
?oXMLHttpRequest.status - This returned 200
Passing the returned jwt-token
oXMLHttpRequest.open("GET","my url")
oXMLHttpRequest.setRequestHeader("Content-Type", "text/xml")
oXMLHttpRequest.setRequestHeader("Content-Type", "application/json")
oXMLHttpRequest.setRequestHeader("Authorization", "AR-JWT<result>") &&passing the saved value
oXMLHttpRequest.Send()
Received "Not able to parse Authorization Header parameter." message.
I am old school, don't know much about web services. Could anyone please assist me with this?
Thanks - Ganga