@controleonline/ui-common 1.2.82 → 1.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api/index.js +31 -5
package/package.json
CHANGED
package/src/api/index.js
CHANGED
|
@@ -391,12 +391,38 @@ export const api = {
|
|
|
391
391
|
|
|
392
392
|
return safeUri;
|
|
393
393
|
},
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
get: async function (uri, options = {}) {
|
|
395
|
+
return await this.fetch(uri, {
|
|
396
|
+
...options,
|
|
397
|
+
method: 'GET',
|
|
398
|
+
});
|
|
399
|
+
},
|
|
400
|
+
post: async function (uri, body = {}, options = {}) {
|
|
401
|
+
return await this.fetch(uri, {
|
|
402
|
+
...options,
|
|
396
403
|
method: 'POST',
|
|
397
|
-
body
|
|
398
|
-
};
|
|
399
|
-
|
|
404
|
+
body,
|
|
405
|
+
});
|
|
406
|
+
},
|
|
407
|
+
put: async function (uri, body = {}, options = {}) {
|
|
408
|
+
return await this.fetch(uri, {
|
|
409
|
+
...options,
|
|
410
|
+
method: 'PUT',
|
|
411
|
+
body,
|
|
412
|
+
});
|
|
413
|
+
},
|
|
414
|
+
patch: async function (uri, body = {}, options = {}) {
|
|
415
|
+
return await this.fetch(uri, {
|
|
416
|
+
...options,
|
|
417
|
+
method: 'PATCH',
|
|
418
|
+
body,
|
|
419
|
+
});
|
|
420
|
+
},
|
|
421
|
+
delete: async function (uri, options = {}) {
|
|
422
|
+
return await this.fetch(uri, {
|
|
423
|
+
...options,
|
|
424
|
+
method: 'DELETE',
|
|
425
|
+
});
|
|
400
426
|
},
|
|
401
427
|
loadSmokeIndex: async function (config = {}) {
|
|
402
428
|
return await requestSmoke('/tests', {}, config);
|