MCPcopy Create free account
hub / github.com/Packstack-Tech/packstack / makeDefaultHeaders

Method makeDefaultHeaders

frontend/src/lib/api/base-api.ts:18–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 }
17
18 makeDefaultHeaders(): RequestHeaders {
19 const headers: RequestHeaders = {
20 'Content-Type': 'application/json;charset=UTF-8'
21 };
22 const jwt = this.jwt.getString();
23 if (jwt !== '') {
24 headers.Authorization = `Bearer ${jwt}`;
25 }
26 return headers;
27 }
28
29 makeRequestConfig(cfg?: AxiosRequestConfig): AxiosRequestConfig {
30 const config: AxiosRequestConfig = cfg || {};

Callers 1

makeRequestConfigMethod · 0.95

Calls 1

getStringMethod · 0.80

Tested by

no test coverage detected