【发布时间】:2019-03-04 06:06:58
【问题描述】:
我对 Flutter 有一个真正的问题..
我使用“http”库向我的 Express 服务器发出 HTTP 请求。 当我尝试发送 HTTP POST 请求时,我的服务器确实收到了它,但我的 Flutter 代码只是停止执行。
print("here");
http.Response response = await http.post(url, body:data);
print("got response!"); // Never executes
我在 Logcat 中看不到任何错误,即使我使用假 URL 或关闭我的服务器,总是会发生相同的结果。执行只是停止,没有任何错误。
有人知道为什么吗???
谢谢!!
【问题讨论】:
标签: http asynchronous post async-await flutter