以角度6发送发帖请求,无需等待响应 [英] Send post request in angular 6 without wait to response

查看:63
本文介绍了以角度6发送发帖请求,无需等待响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在关闭我的应用程序时从angular 6应用程序发送http发帖请求.我的问题是,当我关闭应用程序时,http请求被中止.如何发送http发布请求,而不会以这种方式中止请求?另外,我不在乎结果,我只希望在服务器中完成请求.

解决方案

但是该方法不起作用,因为该页面正在关闭并且无法订阅,并且在网络中它说请求已被取消

I want to send a http post request from an angular 6 app when I close my app. My problem is when I close the app, the http request gets aborted. How can I send a http post request without getting it aborted this way? Also I don’t care about the result, I only want the request to be completed in the server.

解决方案

But is doesn't work because the page is closing and it doesn't get to the subscribe and in the network it said that the request was canceled

这篇关于以角度6发送发帖请求,无需等待响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆