@zwa73/utils 1.0.291 → 1.0.292
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/dist/UtilHttp.d.ts +0 -2
- package/dist/UtilHttp.js +0 -10
- package/package.json +1 -3
package/dist/UtilHttp.d.ts
CHANGED
|
@@ -113,8 +113,6 @@ export declare class UtilHttp<D extends Partial<RequestOption> & Required<Pick<R
|
|
|
113
113
|
header<HAD extends http.OutgoingHttpHeaders>(headers: HAD): UtilHttp<D & {
|
|
114
114
|
headers: HAD;
|
|
115
115
|
}, S, A>;
|
|
116
|
-
/**设置agent */
|
|
117
|
-
proxyAgent(url: string): this;
|
|
118
116
|
/**添加一段query */
|
|
119
117
|
query(data: QueryRequestData): this;
|
|
120
118
|
/**克隆 */
|
package/dist/UtilHttp.js
CHANGED
|
@@ -11,8 +11,6 @@ const querystring_1 = __importDefault(require("querystring"));
|
|
|
11
11
|
const url_1 = require("url");
|
|
12
12
|
const js_utils_1 = require("@zwa73/js-utils");
|
|
13
13
|
const form_data_1 = __importDefault(require("form-data"));
|
|
14
|
-
const http_proxy_agent_1 = require("http-proxy-agent");
|
|
15
|
-
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
16
14
|
const pathe_1 = __importDefault(require("pathe"));
|
|
17
15
|
const UtilFunctions_1 = require("./UtilFunctions");
|
|
18
16
|
const UtilLogger_1 = require("./UtilLogger");
|
|
@@ -101,14 +99,6 @@ class UtilHttp {
|
|
|
101
99
|
};
|
|
102
100
|
return this;
|
|
103
101
|
}
|
|
104
|
-
/**设置agent */
|
|
105
|
-
proxyAgent(url) {
|
|
106
|
-
this._data.agent = UtilFunctions_1.UtilFunc.match(this._data['protocol'], {
|
|
107
|
-
'http:': () => new http_proxy_agent_1.HttpProxyAgent(url),
|
|
108
|
-
'https:': () => new https_proxy_agent_1.HttpsProxyAgent(url),
|
|
109
|
-
});
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
102
|
/**添加一段query */
|
|
113
103
|
query(data) {
|
|
114
104
|
this._data.path = UtilHttp.buildQuery(this._data.path ?? '', data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zwa73/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.292",
|
|
4
4
|
"description": "my utils",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
"form-data": "^4.0.2",
|
|
22
22
|
"glob": "^13.0.0",
|
|
23
23
|
"html-entities": "^2.3.3",
|
|
24
|
-
"http-proxy-agent": "^7.0.2",
|
|
25
|
-
"https-proxy-agent": "^7.0.6",
|
|
26
24
|
"pathe": "^1.1.2",
|
|
27
25
|
"querystring": "^0.2.1",
|
|
28
26
|
"winston": "^3.10.0",
|