I am updating a script from 1.11 to 1.2 and came across this when my
json-proxy started acting weird:

1.11 code:

new Json.Remote("/proxy",{onComplete : function(jdata){
                //blabla...
}}).send({'action':'getStats','prid':itemid})

----------------------------------

1.2 code:

var jsonRequest = new Request.JSON({url : '/proxy',onComplete:
function(jdata){
    //...
}}).POST({'action':'getStats','prid':itemid});

----------------------------------

While in 1.11 the object passed to send() always got send as a string via
POST like this:

POST_VARS[
json => {"action":"getStats","prid":74}
]

1.2 sends the object like regular post-data and not json-encoded:

POST_VARS[
action  => getStats
prid   => 1
]

is this intended and should i use JSON.encode() on the object i want to send
or am i missing something here and there is another possibility to mimic the
1.11 behaviour?

best

martin

Reply via email to