Skip to content

你好,请教关于配置的问题 #92

Answered by swuecho
changeche01 asked this question in Q&A
Discussion options

You must be logged in to vote

代码中的 data: 与 responseText 的data: 解析的时候混淆了.

-            const lastIndex = responseText.lastIndexOf('data: ')
+            const lastIndex = responseText.lastIndexOf('\n\ndata:')
             // Extract the JSON data chunk from the responseText
-            const chunk = responseText.slice(lastIndex + 6)
-
+            const chunk = responseText.slice(lastIndex + 8)

Replies: 15 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by swuecho
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #29 on April 12, 2023 02:06.