0 votes
1 view
in Java by (9.2k points)

Can anyone tell me how to do HTTP GET request in JavaScript in Mac OS X dashcode widget?

1 Answer

0 votes
by (19k points)

You can make use of the XMLHttpRequest object provided by browsers(dashcode) to make HTTP requests in JavaScript like below:

function httpGet(theUrl)

{

    var xmlHttp = new XMLHttpRequest();

    xmlHttp.open( "GET", theUrl, false ); // false for synchronous request

    xmlHttp.send( null );

    return xmlHttp.responseText;

}

Interested in Java? Check out this Java Certification by Intellipaat. 

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...