receive JSON data from client

40 views
Skip to first unread message

Hasan A Yousef

unread,
Oct 19, 2014, 12:30:54 PM10/19/14
to tot...@googlegroups.com
Hi Peter..
I'm playing little bit with DART codes, and tried to send the data to the server as below DART code,  how can I read/reactive the sent data in totaljs

server:
framework.route('/gPOLines');


client:
                request = new HttpRequest();
                request.onReadyStateChange.listen(onData_getpols);
                                 
                request.open('POST', host+'/gPOLines');
                request.send(json.encode(po));

thanks

Peter Širka

unread,
Oct 25, 2014, 3:51:46 AM10/25/14
to tot...@googlegroups.com
Hi Hasan,
sorry I overlooked your post. Yes, it's possible but route must contain:

framework.route('/gPOLines', json_gpolines, ['post']);

Thanks :-)
Reply all
Reply to author
Forward
0 new messages