REST call: how to use x-www-form-urlencoded authentication
The following command is working:
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: text/plain' -d 'apiKey=1234' 'https://www.telemetry.com/webservice/token'
But the following code returns empty string.
var request = "https://www.telemetry.com/webservice/token";
var content = new Object();
content.apiKey = '1234';
var headers = new Object();
headers.Accept = "text/plain";
var params = {
headers: headers /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
url: request /* STRING */,
content: content /* JSON */,
timeout: 60 /* NUMBER */
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].PostJSON(params);
----------------------------------------------------------------------------------------------------------
How to handle the REST call? how to use x-www-form-urlencoded authentication? How to pass the apiKey?

