ronaksomani
9 years agoMentor
http.request to retrieve JSON Object in endpoint
Hello,
I created a new endpoint, and calling it from a component using Ajax POST method.
post request payload is json object as below :
{
"key1":"value1",
"key2": "value2"
}
In endpoint I am trying to retrieve this payload, but not able to do so.
Tried to make use of http.request methods, but they are helpful only if I have a key for this complete json payload.
http.request.attributes.name.get("attribute_name", default_value)
Here, I do not have "attribute_name" to be passed, as I need complete object.
Am I missing something here, or can some one help with approach to do so ?
Thanks in Advance !