Hi,
I'm using a custom uni pipe to let the client send whole JS objects to
the server.
// the code on client side
var cmdPipe = this.core.newPipe('uni', {"pipe": {pubid:
myVarThePubId}});
cmdPipe.send( {aaa:"bbb", foo:"foo", bar:"bar"} );
// the code on server side
var cmdPipe = new Ape.pipe();
cmdPipe.onSend = function(user, params) {
Ape.log("type of received params.msg: "+$type(params.msg));
};
When I look to the post request sent by my browser (with Firebug), It
contains the whole data I wanted to send (ie. with both aaa, foo and
bar values). Those data are stored in the "params.msg" variable.
[{"cmd":"SEND","chl":3,"params":{"msg":
{"aaa":"bbb","foo":"foo","bar":"bar"},"pipe":"73c7642423807af52204da3e4a835222"},"sessid":"5d12c68204061f079147d5b42ed3bc56"}]
But when my callback function 'onSend' is called on server side, the
params.msg is only a simple string (with content beign the value of
the first member of the object sent, aka "bbb"). Here is the 'dump' of
the params variable recevied:
params (object)
msg ='bbb' (string)
from (object)
casttype ='uni' (string)
pubid ='0ce29da071cf73c6a74e258aac4cef84' (string)
properties (object)
pseudo ='anonyme1' (string)
pipe (object)
casttype ='uni' (string)
pubid ='0ce29da071cf73c6a74e258aac4cef84' (string)
properties (object)
pseudo ='anonyme1' (string)
Any idea why such behavior ?
Is there a way to send complete JS objects using a custion uni pipe ?
Thanks in advance.
Regards,
Nouk²
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/
To unsubscribe from this group, send email to
ape-project+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.