Vanessa
2026-05-20 12:07:53 +08:00
parent 097e3b7ec4
commit 265c241985
+4 -2
View File
@@ -11,10 +11,9 @@ export const fetchPost = (
cb?: (response: IWebSocketData) => void,
headers?: IObject,
failCallback?: (response: IWebSocketData) => void,
abortSignal?: AbortSignal) => {
signal?: AbortSignal) => {
const init: RequestInit = {
method: "POST",
signal: abortSignal,
};
if (data) {
if (["/api/search/searchRefBlock", "/api/graph/getGraph", "/api/graph/getLocalGraph",
@@ -39,6 +38,9 @@ export const fetchPost = (
if (headers) {
init.headers = headers;
}
if (signal) {
init.signal = signal;
}
let isGetFile202 = false;
fetch(url, init).then((response) => {
switch (response.status) {