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:
No branches or pull requests
当终止链接时页面直接报错,无法catch
The text was updated successfully, but these errors were encountered: