Hi ,
I am trying to call rest api which is using request as "x-www-form-urlencoded", I am using thingworx PostText Service but everytime getting Below error whereas I have passed username and password.
result
{"error":"Argument \u0022username\u0022 is required."}
Below is the code : I have made username,password, and url hidden in below code
var params = { proxyScheme: undefined /* STRING */, headers: undefined /* JSON */, ignoreSSLErrors: false /* BOOLEAN */, useNTLM: undefined /* BOOLEAN */, workstation: undefined /* STRING */, useProxy: undefined /* BOOLEAN */, withCookies: undefined /* BOOLEAN */, proxyHost: undefined /* STRING */, url: "https://" /* STRING */, content: "" /* STRING */, timeout: undefined /* NUMBER */, proxyPort: undefined /* INTEGER */, password: "abc" /* STRING */, domain: undefined /* STRING */, contentType: "application/x-www-form-urlencoded" /* STRING */, username: "xyz" /* STRING */ }; // result: STRING var result = Resources["ContentLoaderFunctions"].PostText(params);
Output:
result
{"error":"Argument \u0022username\u0022 is required."}
Any kind of help would be highly helpful for me.
Waiting for your response.
Thanks In Advance.
... View more