提交 9fdf2be4 编写于 作者: D DebugIsFalse

Update fetchEventSource.js

上级 dfb1a4c6
......@@ -10,6 +10,11 @@ export default (url, { onmessage, onerror, controller, params }) => {
'Authorization': token.value
},
body: JSON.stringify(params),
onopen (response) {
if (response.status === 401 || response.status === 403) {
throw Error()
}
},
onmessage (info) {
onmessage(info)
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册