Handling post data in api calls

I have a method that has been whitelisted to be called via api calls.the api call is made from an external application via POST method. Now, I dont know how to process the data received from the POST request in the whitelisted method. Any idea on how to receive the data and process it?

I did not understand it correctly but you can try frappe.msgprint(frappe.as_json(data_here)) or frappe.msgprint(repr(data_here)).
Note: I did not read all documentation.

I found it from frappe code.
The data received via POST method is stored in frappe.local.form_dict. It has 2 elements - cmd and data.
Using json.loads the data can be parsed.

Hi, the response is a json string. You can easily parse it with JSON.parse or any method provided by the language.