How can I get ORM / copyFrom to work when posting form data with a content type of application/json? (POST is not populated).

23 views
Skip to first unread message

Matt Darby

unread,
Dec 18, 2016, 11:39:53 AM12/18/16
to Fat-Free Framework
I'm building an Aurelia front end that is sending form data with a content type of application/json which seems to mean that POST is not populated with the form data.

How can I access the form data as an array that I can then use in copyFrom and the Fat Free ORM functionality which looks good.

Any help appreciated!


ved

unread,
Dec 18, 2016, 11:54:32 AM12/18/16
to Fat-Free Framework
Try:

$post = json_decode(file_get_contents("php://input"));
Reply all
Reply to author
Forward
0 new messages