From 6bbc2f3bf34debf6e3547c4000ba6fe9abe43b7d Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Fri, 22 Jul 2022 18:51:55 +0800 Subject: [PATCH] 微调请求捕获细节 --- bases/Fetcher.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index 4fd1e10..5a3c494 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -150,8 +150,8 @@ // 捕获响应 options && options.onCapture && options.onCapture({ url: this._createUrlPrefix(options) + url, - request: JSON.stringify(data), - response: JSON.stringify(response.data), + request: data, + response: { ...response.data }, httpCode: response.statusCode, }); /** @@ -173,7 +173,7 @@ // 捕获响应 options && options.onCapture && options.onCapture({ url: this._createUrlPrefix(options) + url, - request: JSON.stringify(data), + request: data, httpCode: error && error.status, httpMsg: msg + (error.message ? (' / ' + error.message) : ''), }); -- Gitblit v1.9.1