code: private static String syncRestNativeCall(final String purl) {
      final XMLHttpRequest xmlHttp = Browser.getWindow().newXMLHttpRequest();
      xmlHttp.open("GET", purl, false); // false for synchronous request
      xmlHttp.send();
      return xmlHttp.getResponseText();
    }
docs: simple synchronous rest get call