I have a controller action that will be used for webhook handler.
When I did the form post to that URL with header content-type:
application/x-www-form-urlencoded
My load is:
MyVariableOne=ValueOne&MyVariableTwo=ValueTwo
On the action's execute function, I had $data as
$data = $this->getRequest()->getPostValue();
When I do var_dump, I got:
array(2) { ["MyVariableOne"]=> string(8) "ValueOne" ["MyVariableTwo"]=> string(8) "ValueTwo" }
But when I change the content-type to application/json and set payload to:
{"MyVariableOne":"ValueOne","MyVariableOne":"ValueTwo"}
the var_dump now become:
array(0) { }
Am I missing some steps to make my webhook hanlder support
Thank you,