JSON Request payload

Discuss about Group-Office development here

Moderator: Developers

jamesarthur
Posts: 55
Joined: Fri Nov 08, 2013 9:15 am

JSON Request payload

Postby jamesarthur » Sun Mar 23, 2014 1:37 pm

Would you consider adding something like

Code: Select all

if ($_SERVER["CONTENT_TYPE"] === 'application/json') {
  $params = array_merge($params, json_decode(file_get_contents('php://input'), true));
}
 
in the AbstractController - so that we could use json in requests as well as responses?
mschering
Site Admin
Site Admin
Posts: 8284
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: JSON Request payload

Postby mschering » Mon Mar 24, 2014 11:38 am

I think you should extend the abstract controller and implement it in there.
Best regards,

Merijn Schering
Intermesh

Who is online

Users browsing this forum: No registered users and 2 guests

cron