Any suggestions on how to convert this into a url to POST and or GET using roURlXfer?
Would the \ be converted to an ampersand? or the -d ? I tried putting it all on one line with ampersands and it was no-go, whereas cUrling it worked perfectly.
Yes, with an “&”. The POST string should look pretty much identical to a querystring, without the leading “?”. Note that, typically, it should also be URL encoded like a querystring, as well.
urlTransfer = CreateObject("roUrlTransfer")
urlTransfer.SetUrl("https://api.blah.com/ath/link")
urlTransfer.AddHeader("Content-Type", "application/x-www-form-urlencoded")
result = urlTransfer.PostFromString("client_id=lOnGStringOfCharacters&client_secret=reallyreallylongstringofcharacters&grant_type=password&username=blabla%40blababla.com&password=s0mth1ng&redirect_uri=http%3a%2f%2fmyblah.com%2ffail")
One more question: how do I get the response information from this POST? postfromstring just returns an integer, not the response info I get with cUrl on the command line.