Im making a call to a REST endpoint using a URLConnect subclass that I expect return a Bearer token nad it does perfectly on Postman but not for me via Webapp or desktop. I have tried 9 ways to sunday to reformat this body with and without quotes etc, no joy. If i inspect the Postman setup in their console it is the form-urlencoded type and I also noticed postman is TSL1.2 - could that be the issue? I just keep getting a 400 error saying the grant_type is unsupported but it works fine in postman. Anyone see this before?
me.ClearRequestHeaders
var requestContent as string = "{"+_
&u22 + "grant_type" + &u22 + ":" + &u22 + "client_credentials" + &u22 + "," +_
&u22 + "client_id" + &u22 + ":" + &u22 + "aaaaaaax@3eb556347477377015870" + &u22 + "," +_
&u22 + "client_secret" + &u22 + ":" + &u22 +"67568jjrt87titirtirt0a42e16b0c0a"+ &u22 +"}"
me.SetRequestContent(requestContent, "application/x-www-form-urlencoded")
me.RequestHeader("Content-Type") = "application/json"
var payload as string ="https://myendpoint.com/token"
me.Send("POST", payload)