How can I get the value from the body of a post request within API created via Server Script?
For example, if my request post data is as below:
{
"name" : "someone",
"country": "India"
}
How can I get the value in the request from within server script? I tried the below way with no success.
country = frappe.request.POST.get('country')
frappe.response['message'] = country
Server Script in Frappe:
Request an the error:
Error Text:
"exception":"TypeError: 'NoneType' object is not callable"