<commit_before>import "dart:html";
import 'package:js/js.dart' as js;

DivElement dartDiv;

main() {
  // Say that the application has been loaded.
  dartDiv = query("#dartDiv");
  printString("Dart application loaded");
  
  // Request some JSON from the server. You can use the "dart:json" library
  // to parse it.
  new HttpRequest.get("/gwt_application/json_servlet", (req) {
    printString("Here's the JSON I got: ${req.responseText}");
  });
<commit_msg>Dart changed the API for doing HTTP GETs<commit_after>import "dart:html";
import 'package:js/js.dart' as js;

DivElement dartDiv;

main() {
  // Say that the application has been loaded.
  dartDiv = query("#dartDiv");
  printString("Dart application loaded");
  
  // Request some JSON from the server. You can use the "dart:json" library
  // to parse it.
  HttpRequest.getString("/gwt_application/json_servlet").then((json) {
    printString("Here's the JSON I got: $json");
  }).catchError((e) {
    printString("Couldn't fetch JSON: ${e.error}");
  });

{'fraction_non_alphanumeric': 0.14425907752698724, 'fraction_numerical': 0.0, 'mean_word_length': 4.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2652989', 'n_tokens_mistral': 335, 'n_tokens_neox': 329, 'n_words': 100}