We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当终止链接时页面直接报错,无法catch
const abortController = new AbortController(); fetchEventSource(`${baseServer}/polar//public/aiChat/chat`, { method: 'POST', signal: abortController.signal, headers: { 'Content-Type': 'application/json; charset=UTF-8', user: Storage.getUid() || '', token: Storage.getToken() || '', domain: Storage.getDomain() || '', ticket: Storage.getTicket() || '', tenant: Storage.getTenant() || '', version: Storage.getV() || '' }, body: JSON.stringify({ conversationId: conversationId, question: message }), async onmessage(msg) { // abortController.abort() console.log('Received:', msg.data); // 处理接收到的消息 }, onclose() { console.log("111111111111111111close") // abortController.abort() }, onerror(err) { console.log(err); // abortController.abort() } }).then(result=>{ console.log(result) }).catch(err => { console.error(err); })
The text was updated successfully, but these errors were encountered:
你解决了吗?? 我也遇到了 我自己也没有手动去关闭连接,每次会话结束自己就弹出来了,有点奇怪
Sorry, something went wrong.
没解决,最后我换了个最原始方式实现的框架来搞得这个需求
No branches or pull requests
当终止链接时页面直接报错,无法catch
The text was updated successfully, but these errors were encountered: