0

Recieve response as JSON object

Hi,
Does anyone tell me how to get the response as a JSON object. I have done the below but still i get the response as XML.
CAn anyone help me with this?

var url = new URL();
var user = result.username;
var pwd = result.password;
url.location = "http://xxx";
url.postData = user + pwd ;
url.setRequestHeader("Content-type", "application/json" );
url.fetchAsync(url_done);

function url_done(url){
//Some implementation
}

by
1 Reply
  • Is the item you fetching XML or JSON?

    The engine does not determine the information transport format.
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets