【发布时间】:2020-06-15 13:06:23
【问题描述】:
我正在处理 http 请求。突然应我的要求,我得到响应状态代码为“200”,以便我的 api 正在工作..但是,在我的响应正文中,返回不完整。顺便说一下,这是我使用的资源。
String APILink = "http://10.12.50.46:9191";
String compressedString2;
Future<SuccessData> getSession() async {
http.Response response2=await http.post(
Uri.encodeFull(APILink+"/Mobile/StartSession"),
headers:{
"Auth-Key":"InSys-dev-key-001 ",
},body:compressedString2,
);
print("Compressed JSON:"+compressedString2);
print(response2.statusCode);
var dataGather2 = json.decode(response2.body);
print(response2.body);
}
这是我对使用 insomnia (Rest API) 的实际反应
这是我在 logcat 上的打印数据:
如果您注意到,我在“ResultSet”上的返回数据不完整.. 其他数据也确实被提取,例如状态、错误消息,并且未查看标签。
【问题讨论】: