let s = ureq::get(u).call().into_string()?;
let mut response = reqwest::blocking::get(u)?;
let mut s = String::new();
response.read_to_string(&mut s)?;
let client = Client::new();
let s = client.get(u).send().and_then(|res| res.text())?;
var client = new HttpClient();
s = await client.GetStringAsync(u);
string s = u.get.to!string;
res, err := http.Get(u)
if err != nil {
return err
}
buffer, err := io.ReadAll(res.Body)
res.Body.Close()
if err != nil {
return err
}
s := string(buffer)
fetch(u)
.then(res => res.text())
.then(text => s = text)
const res = await fetch(u)
s = await res.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);
$.get(u, function(data){
s = data;
});
String s = HttpClient.newHttpClient().send(HttpRequest.newBuilder()
.uri(URI.create(u))
.GET()
.build(), HttpResponse.BodyHandlers.ofString())
.body();
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();
}
(defvar *s* (string (dex:get u)))
$s = file_get_contents($u);
with TFPHTTPClient.Create(nil) do try
s := get(u);
finally
Free;
end;
my $s = HTTP::Tiny->new->get($u)->{content};
s = requests.get(u).content.decode()
with urllib.request.urlopen(u) as f:
s = f.read()
u = URI("http://example.com/index.html")
s = Net::HTTP.get_response(u).body
val s = scala.io.Source.fromURL(u).getLines().mkString("\n")