Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
I have got json to pass to the rest api.
created json:
{
"Path": "sample string 1",
"Name": "sample string 2",
"Value": "sample string 3",
"TimeStamp": "sample string 4"
}
if am using postJson method how to pass above json to PostJson method?
Solved! Go to Solution.
Hi Nisha,
Just populate the content parameter with your Json.
For example :
var myJson = {
"Path": "sample string 1",
"Name": "sample string 2",
"Value": "sample string 3",
"TimeStamp": "sample string 4"
};
var params = {
headers: myHeader /* JSON */,
url: myUrl /* STRING */,
content: myJson /* JSON */,
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].PostJSON(params);
Hi Nisha,
Just populate the content parameter with your Json.
For example :
var myJson = {
"Path": "sample string 1",
"Name": "sample string 2",
"Value": "sample string 3",
"TimeStamp": "sample string 4"
};
var params = {
headers: myHeader /* JSON */,
url: myUrl /* STRING */,
content: myJson /* JSON */,
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].PostJSON(params);
Hi Stephane,
if my rest service is returning boolean so will i get that in result using PostJson?
Thanks it worked