cvitool 1.0.746 → 1.0.748
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/build/src/hgo.d.ts +8 -1
- package/build/src/hgo.js +13 -1
- package/package.json +1 -1
- package/src/hgo.ts +12 -1
package/build/src/hgo.d.ts
CHANGED
|
@@ -118,4 +118,11 @@ declare function put(url: string, options?: methodReqOptions): Promise<ResData>;
|
|
|
118
118
|
* @returns
|
|
119
119
|
*/
|
|
120
120
|
declare function head(url: string, options?: methodReqOptions): Promise<ResData>;
|
|
121
|
-
|
|
121
|
+
/**
|
|
122
|
+
* request-delete
|
|
123
|
+
* @param url
|
|
124
|
+
* @param options
|
|
125
|
+
* @returns
|
|
126
|
+
*/
|
|
127
|
+
declare function del(url: string, options?: methodReqOptions): Promise<ResData>;
|
|
128
|
+
export { reqOptions, methodReqOptions, reqSendBufferOptions, reqSendStreamOptions, reqSendMultiPartOptions, ResData, Method, ResType, request, reqSendBuffer, reqSendStream, reqSendMultiPart, get, post, put, head, del };
|
package/build/src/hgo.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.head = exports.put = exports.post = exports.get = exports.reqSendMultiPart = exports.reqSendStream = exports.reqSendBuffer = exports.request = void 0;
|
|
12
|
+
exports.del = exports.head = exports.put = exports.post = exports.get = exports.reqSendMultiPart = exports.reqSendStream = exports.reqSendBuffer = exports.request = void 0;
|
|
13
13
|
const querystring = require("querystring");
|
|
14
14
|
const https = require("https");
|
|
15
15
|
const http = require("http");
|
|
@@ -414,6 +414,18 @@ function head(url, options) {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
exports.head = head;
|
|
417
|
+
/**
|
|
418
|
+
* request-delete
|
|
419
|
+
* @param url
|
|
420
|
+
* @param options
|
|
421
|
+
* @returns
|
|
422
|
+
*/
|
|
423
|
+
function del(url, options) {
|
|
424
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
425
|
+
return request(url, Object.assign(Object.assign({}, options), { method: 'delete' }));
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
exports.del = del;
|
|
417
429
|
function getReqProtocolAndOpt(url, baseHeaders, headers, timeout, method, agent, useEnvProxy, proxyHost) {
|
|
418
430
|
let reqProtocol = getProtocol(url);
|
|
419
431
|
const urlOpt = new URL(url);
|
package/package.json
CHANGED
package/src/hgo.ts
CHANGED
|
@@ -463,6 +463,16 @@ async function head(url: string, options?: methodReqOptions) {
|
|
|
463
463
|
return request(url, { ...options, method: 'head' });
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
+
/**
|
|
467
|
+
* request-delete
|
|
468
|
+
* @param url
|
|
469
|
+
* @param options
|
|
470
|
+
* @returns
|
|
471
|
+
*/
|
|
472
|
+
async function del(url: string, options?: methodReqOptions) {
|
|
473
|
+
return request(url, { ...options, method: 'delete' });
|
|
474
|
+
}
|
|
475
|
+
|
|
466
476
|
function getReqProtocolAndOpt(url: string, baseHeaders: CustomObject, headers: CustomObject, timeout: number, method: Method, agent: http.Agent | https.Agent,
|
|
467
477
|
useEnvProxy: boolean, proxyHost: string) {
|
|
468
478
|
let reqProtocol = getProtocol(url);
|
|
@@ -515,5 +525,6 @@ export {
|
|
|
515
525
|
get,
|
|
516
526
|
post,
|
|
517
527
|
put,
|
|
518
|
-
head
|
|
528
|
+
head,
|
|
529
|
+
del
|
|
519
530
|
};
|