I am trying this code in Javascript. But its not working.... The postData is json data sent to the server to be saved. I have checked that JSON data needs to be parsed or stringify... is that the problem.. or I am doing some other silly mistake...
var postData ="_out=json&name=justtryit&def={"layout":[{"id":"sw-156","xy":[168,80]},{"id":"_OUTPUT","xy":[508.33331298828125,95.81666564941406]}],"modules":[{"type":"fetch","id":"sw-156","conf":{"URL":{"value":"www.sports.yahoo.com","type":"url"}}},{"type":"output","id":"_OUTPUT","conf":{}}],"terminaldata":[],"wires":[{"id":"_w1","src":{"id":"_OUTPUT","moduleid":"sw-156"},"tgt":{"id":"_INPUT","moduleid":"_OUTPUT"}}]}&rnd=7821&.crumb=P.r4cQGAC.Y";
var handleSuccess = function(o)
{ 
if(o.responseText !== undefined)
  {
 alert('o.responseText');
   }
}
var handleSuccess = function(o)
{
}
var callback ={ success:handleSuccess,  failure: handleFailure, argument: ['foo','bar']}; 
var request = YAHOO.util.Connect.asyncRequest('POST','http://pipes.yahoo.com/pipes/ajax.pipe.save' , callback, postData);