MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / requestWithAuthIfRequired

Method requestWithAuthIfRequired

client/src/api/utils/Auth-Utils.ts:28–39  ·  view source on GitHub ↗
(config: AxiosRequestConfig)

Source from the content-addressed store, hash-verified

26 }
27
28 async requestWithAuthIfRequired(config: AxiosRequestConfig) {
29 const token = await this.getAccessToken();
30 const authorizationHeaders = token ? { Authorization: `Bearer ${token}` } : {};
31
32 return axios({
33 ...config,
34 headers: {
35 ...config.headers,
36 ...authorizationHeaders
37 }
38 });
39 }
40 }

Callers 15

syncMethod · 0.80
queryMethod · 0.80
listMethod · 0.80
getMethod · 0.80
getSasTokenMethod · 0.80
updateMethod · 0.80
createMethod · 0.80
getMetaMethod · 0.80
updateMetaMethod · 0.80
trackMethod · 0.80
queryMetaMethod · 0.80

Calls 1

getAccessTokenMethod · 0.95

Tested by

no test coverage detected