This is the correct method; the important difference is that you are using the result of GetCookies as the cookie header. Note that sometimes the cookie result goes into a Cookie header, as in the original post:
i.e:
var params = {
proxyScheme: undefined /* STRING */,
// headers: {"JSESSIONID":"4C211033F290F29A152173A47A26FC78"} /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: true /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "http://localhost:8080/Thingworx/Things" /* STRING */,
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: "admin" /* STRING */,
domain: "http://localhost:8080/" /* STRING */,
username: "Administrator" /* STRING */
};
// result: STRING
var cookieResult = Resources["ContentLoaderFunctions"].GetCookies(params);
var Cookieparams = {
proxyScheme: undefined /* STRING */,
headers: {"Cookie":cookieResult } /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
withCookies: true /* BOOLEAN */,
url: "url?Parameters" /* STRING */,
};
// result: STRING
var result = Resources["ContentLoaderFunctions"].GetJSON(Cookieparams);
This will depend on the format required by the receiving server, but should match whatever works in postman.