[英]FormatException: Unexpected end of input (at character 1) ^
i already work with this method and it's working correctly but today i run the same code and i have this error: response message: 500 Internal Server Error I/flutter ( 8784): FormatException: Unexpected end of input (at character 1) I/flutter ( 8784): I/flutter ( 8784): ^我已经使用这种方法并且它工作正常但是今天我运行相同的代码并且我有这个错误:响应消息:500 Internal Server Error I/flutter (8784): FormatException: Unexpected end of input (at character 1) I/颤动(8784):我/颤动(8784):^
Future<String> getCompanies() async {
try {
var response = await http.get(Uri.parse(companies), headers: {
HttpHeaders.authorizationHeader: basicauth,
HttpHeaders.contentTypeHeader: 'application/json'
});
if (mounted) {
this.setState(() {
var resbody = JsonDecoder().convert(response.body);
data = resbody["value"];
});
}
} catch (e) {
print(e);
}
}
Probably causing by charset variation.可能是由字符集变化引起的。 Use CHARSET=utf8 in sqli/pd0 connection.在 sqli/pd0 连接中使用 CHARSET=utf8。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.