MCPcopy Create free account
hub / github.com/calfonso/rusternetes / headers

Function headers

console/src/engine/query.ts:12–21  ·  view source on GitHub ↗

Build headers for API requests.

()

Source from the content-addressed store, hash-verified

10
11/** Build headers for API requests. */
12function headers(): HeadersInit {
13 const h: Record<string, string> = {
14 Accept: "application/json",
15 };
16 const token = sessionStorage.getItem("rusternetes-token");
17 if (token) {
18 h["Authorization"] = `Bearer ${token}`;
19 }
20 return h;
21}
22
23export interface K8sError {
24 status: number;

Callers 6

k8sListFunction · 0.85
k8sGetFunction · 0.85
k8sCreateFunction · 0.85
k8sUpdateFunction · 0.85
k8sPatchFunction · 0.85
k8sDeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected