public String get(String url) {
if(url == null) {
throw new ScriptusRuntimeException("no arg presented for sleep");
}
URL u;
try {
u = new URL(url);
} catch (MalformedURLException e) {
throw new ScriptusRuntimeException(e);
}
if( ! "http".equals(u.getProtocol()) && ! "https".equals(u.getProtocol())) {
throw new ScriptusRuntimeException("only http and https supported right now");
}
ContinuationPending pending = Context.getCurrentContext().captureContinuation();
pending.setApplicationState(new Get(u));
throw pending;