MCPcopy
hub / github.com/willnewii/qiniuClient / _request

Method _request

src/renderer/api/API.js:36–54  ·  view source on GitHub ↗
(url, type, param)

Source from the content-addressed store, hash-verified

34 }
35
36 _request(url, type, param) {
37 this.view && this.view.$Loading.start();
38
39 this.config.method = type;
40
41 let request;
42 if (type === 'get') {
43 request = axios.get(url, this.config);
44 } else {
45 request = axios[type](url, param, this.config);
46 }
47
48 request.then((response) => {
49 this.view && this.view.$Loading.finish();
50 }).catch((error) => {
51 this.view && this.view.$Loading.error();
52 });
53 return request;
54 }
55
56}
57

Callers 4

postMethod · 0.95
getMethod · 0.95
doRequsetFunction · 0.80
doRequsetPostFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected