以 6 角发送 post 请求,无需等待响应

编程入门 行业动态 更新时间:2024-10-17 11:26:17
本文介绍了以 6 角发送 post 请求,无需等待响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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

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 角发送 post 请求,无需等待响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-22 16:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1026967.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:post

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!