I'm trying to use goog.net.XhrIo
in the Closure library to do an Ajax call. Here's my code:
goog.require('goog.net.XhrIo');
function doRequest() {
var request = new goog.net.XhrIo();
goog.events.listen(request, goog.net.EventType.COMPLETE, function(){
console.log("YES! YES! YES!");
});
request.send("http://some_url.com/update");
}
doRequest();
However, I'm getting this error:
TypeError: goog.structs.Map is not a constructor
I'm still a beginner at this so I have no idea what's up.