From 685c1e3b016b539e94c3c5931267668d15b4dfc8 Mon Sep 17 00:00:00 2001 From: qxa Date: Wed, 21 Feb 2024 16:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 25 ++++++++++++++----------- index.js | 7 +++++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/dist/index.js b/dist/index.js index a8315ec..5390e2b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -40,7 +40,7 @@ module.exports = /******/ // the startup function /******/ function startup() { /******/ // Load entry module and return exports -/******/ return __webpack_require__(571); +/******/ return __webpack_require__(52); /******/ }; /******/ // initialize runtime /******/ runtime(__webpack_require__); @@ -51,14 +51,7 @@ module.exports = /************************************************************************/ /******/ ({ -/***/ 211: -/***/ (function(module) { - -module.exports = require("https"); - -/***/ }), - -/***/ 571: +/***/ 52: /***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) { "use strict"; @@ -77,10 +70,13 @@ const content_type = process.env.INPUT_CONTENT_TYPE.trim() const template = process.env.INPUT_TEMPLATE.trim() urls.forEach(item => { + console.log(item) let request = undefined if (item.startsWith('http://')) { + console.log('使用http', item) request = http__WEBPACK_IMPORTED_MODULE_0__.http_request } else if (item.startsWith('https://')) { + console.log('使用https', item) request = https__WEBPACK_IMPORTED_MODULE_1__.https_request } @@ -104,8 +100,8 @@ urls.forEach(item => { res.on('end', () => { console.log(`服务器返回结果:${data}`); - }); - }); + }) + }) req.write(template) // 将POST请求参数写入请求流中 req.end() // 完成请求 @@ -113,6 +109,13 @@ urls.forEach(item => { }) +/***/ }), + +/***/ 211: +/***/ (function(module) { + +module.exports = require("https"); + /***/ }), /***/ 605: diff --git a/index.js b/index.js index 45e2abf..a94546c 100644 --- a/index.js +++ b/index.js @@ -8,10 +8,13 @@ const content_type = process.env.INPUT_CONTENT_TYPE.trim() const template = process.env.INPUT_TEMPLATE.trim() urls.forEach(item => { + console.log(item) let request = undefined if (item.startsWith('http://')) { + console.log('使用http', item) request = http_request } else if (item.startsWith('https://')) { + console.log('使用https', item) request = https_request } @@ -35,8 +38,8 @@ urls.forEach(item => { res.on('end', () => { console.log(`服务器返回结果:${data}`); - }); - }); + }) + }) req.write(template) // 将POST请求参数写入请求流中 req.end() // 完成请求