MCPcopy Index your code
hub / github.com/Packstack-Tech/packstack / post

Method post

frontend/src/lib/api/base-api.ts:45–53  ·  view source on GitHub ↗
(url: string, data: S, config?: AxiosRequestConfig)

Source from the content-addressed store, hash-verified

43 }
44
45 post<S, T>(url: string, data: S, config?: AxiosRequestConfig): Promise<void | AxiosResponse<T>> {
46 return axios.post<T>(url, data, this.makeRequestConfig(config)).catch((err: AxiosError) => {
47 if (err.response != null && err.response.status === 401) {
48 this.jwt.revokeToken();
49 return;
50 }
51 throw err;
52 });
53 }
54
55 put<S, T>(url: string, data: S, config?: AxiosRequestConfig): Promise<void | AxiosResponse<T>> {
56 return axios.put<T>(url, data, this.makeRequestConfig(config)).catch((err: AxiosError) => {

Callers 8

UserClass · 0.80
PackClass · 0.80
ItemClass · 0.80
item.jsFile · 0.80
pack.jsFile · 0.80
user.jsFile · 0.80
addEmailSubscriberFunction · 0.80
sendPasswordResetFunction · 0.80

Calls 2

makeRequestConfigMethod · 0.95
revokeTokenMethod · 0.80

Tested by

no test coverage detected