|
|
|
@ -82,10 +82,11 @@ export async function fetchStream(url, params = {}, onChunk = (chunk) => {}) { |
|
|
|
showFullScreenLoading(); |
|
|
|
try { |
|
|
|
const token = window.sessionStorage.getItem('token'); |
|
|
|
let tokentype = window.sessionStorage.getItem("tokentype"); |
|
|
|
const headers = { |
|
|
|
'Content-Type': 'application/json' |
|
|
|
}; |
|
|
|
if (token) headers['Authorization'] = `Bearer ${token}`; |
|
|
|
if (token) headers['Authorization'] = `${tokentype} ${token}`; |
|
|
|
|
|
|
|
const resp = await fetch(fullUrl, { |
|
|
|
method: 'POST', |
|
|
|
|