Commit d2f9ca52 by weiw

fix:增加流式接口的请求头

parent 20bd0cff
...@@ -57,6 +57,7 @@ export function fetchStreamResponse(url: string, body: Record<string, any>, onMe ...@@ -57,6 +57,7 @@ export function fetchStreamResponse(url: string, body: Record<string, any>, onMe
} }
fetch(url, { fetch(url, {
headers: { headers: {
'accept': 'text/event-stream',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X-Token': JSON.parse(window.localStorage.getItem('__TOKEN__') || ''), 'X-Token': JSON.parse(window.localStorage.getItem('__TOKEN__') || ''),
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment