Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
(def s (slurp u))
String s = u.text
fetch(u)
.then(res => res.text())
.then(text => s = text)
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
s = xmlHttp.responseText;
}
xmlHttp.open("GET", u, true);
xmlHttp.send(null);
const res = await fetch(u)
s = await res.text()
HttpsURLConnection h = null;
try {
h = (HttpsURLConnection) u.openConnection();
h.setRequestMethod("GET");
String s = new String(h.getInputStream().readAllBytes());
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
if (h != null) h.disconnect();
}
$s = file_get_contents($u);
val s = scala.io.Source.fromURL(u).getLines().mkString("\n")