JINESH GANDHI
IS-IT--Management
Hello,
Following is my visual foxpro code and i want to pass parameters as body how to do?
loHttp = CreateObject('Msxml2.ServerXMLHTTP.6.0')
loRequest = loHTTP.open('POST',"
loHttp.setRequestHeader("Content-Type", "text/json")
loHttp.SetRequestHeader("username","testeway@mastersindia.co")
loHttp.SetRequestHeader("password","!@#Demo!@#123")
loHttp.SetRequestHeader("client_id","fIXefFyxGNfDWOcCWnj")
loHttp.SetRequestHeader("client_secret","QFd6dZvCGqckabKxTapfZgJc")
loHttp.SetRequestHeader("grant_type","password")
loHttp.Send( )
Above code not working in visual foxpro
and create error in response
{"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}
But when I am using POSTMAN and put all parameter in BODY section these api is working.
I dont know how to pass parameter as body
kindly guide me
Following is my visual foxpro code and i want to pass parameters as body how to do?
loHttp = CreateObject('Msxml2.ServerXMLHTTP.6.0')
loRequest = loHTTP.open('POST',"
loHttp.setRequestHeader("Content-Type", "text/json")
loHttp.SetRequestHeader("username","testeway@mastersindia.co")
loHttp.SetRequestHeader("password","!@#Demo!@#123")
loHttp.SetRequestHeader("client_id","fIXefFyxGNfDWOcCWnj")
loHttp.SetRequestHeader("client_secret","QFd6dZvCGqckabKxTapfZgJc")
loHttp.SetRequestHeader("grant_type","password")
loHttp.Send( )
Above code not working in visual foxpro
and create error in response
{"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}
But when I am using POSTMAN and put all parameter in BODY section these api is working.
I dont know how to pass parameter as body
kindly guide me