我正在尝试解决如何在 HttpRequest 中的 Dart 中设置请求标头
HttpRequest req = new HttpRequest();
req.setRequestHeader("Content-type","application/json");
req.open("Get", gotest);
req.onLoadEnd.listen((event) => onSuccess(req));
req.send(null);
结果是:
Breaking on exception: Error: InvalidStateError: DOM Exception 11
编辑: gotest 设置为
var gotest = "http://127.0.0.1:9900/janus/parameter/sampleCount/201/1225/1313";