public NetResponse pushData(String strUrl, String strBody, IRhoSession oSession) throws Exception { m_bCancel = false; if (RhodesApp.getInstance().isRhodesAppUrl(strUrl)) { IRhoRubyHelper helper = RhoClassFactory.createRhoRubyHelper(); return helper.postUrl(strUrl, strBody); } return doRequest("POST", strUrl, strBody, oSession, null); }
void showGeoLocation() { String location = ""; try { IRhoRubyHelper helper = RhoClassFactory.createRhoRubyHelper(); location = helper.getGeoLocationText(); } catch (Exception exc) { LOG.ERROR("getGeoLocationText failed", exc); } respondOK(); contentLength = location.length(); responseData = new ByteArrayInputStream(location.getBytes()); resHeaders.addProperty("Content-Type", "text/html"); resHeaders.addProperty("Content-Length", Integer.toString(contentLength)); }