Here is an example to make a mail request:
goog.require('goog.Uri'); goog.require('goog.net.XhrIo'); var qd = new goog.Uri.QueryData(); qd.add('name1', 'val1'); qd.add('name2', 'val2'); function done(e) { this.getResponseText(); this.getResponseJson(); } goog.net.XhrIo.send('/controller/action', done, 'POST', qd.toString());
source share