Hello good afternoon, I want to make an API restle...
# suitescript
w
Hello good afternoon, I want to make an API restlet that takes data per post, can you please give me an example? Thank you
b
j
Copy code
/**
 * @NApiVersion 2.x
 * @NScriptType restlet
 * 
 * last modified 2019-06-11 JB
*/
define([], function() {
	
	return {
		post: post
	}
	
	function post(post_data) {
			
		// do stuff with post_data

	}

});
where are you getting stuck?
w
on how to take the data friend, that is, could I capture the data with post_data.data? that way?
j
Have you had a look through SuiteAnswers yet? There is info in there. What have you already tried?
w
I already clarified the question, thank you very much! and if I reviewed it, but it was only an explanatory doubt
j
...?
w
I was wondering how to read the body data in the restlet
j
what have you already tried?
w
yes i have already tried