mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2026-07-07 23:32:33 +00:00
feat: implement the Status API on Settings page (#470)
This commit is contained in:
@@ -34,23 +34,23 @@ class HTTPError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
const BasePath = `/graphql`;
|
||||
export const BasePath = `/graphql`;
|
||||
|
||||
export async function httpQuery({
|
||||
path = "",
|
||||
url = "",
|
||||
method = "GET",
|
||||
json,
|
||||
headers = {},
|
||||
}: {
|
||||
path?: string;
|
||||
method: string;
|
||||
json: unknown;
|
||||
headers: Recordable;
|
||||
headers?: Recordable;
|
||||
url: string;
|
||||
}) {
|
||||
const timeoutId = setTimeout(() => {
|
||||
abortRequestsAndUpdate();
|
||||
}, Timeout);
|
||||
const url = `${BasePath}${path}`;
|
||||
|
||||
const response: Response = await fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user