I've created a webhook endpoint and now receiving requests with my Laravel application.
If request comes with the form data, I use $request->post();
, if it has a json body I use $request->getContent()
.
I understand that there may not be both. Right?
My question is - how can I check if response comes with the form data or json body?