| | |
| | | // 捕获响应 |
| | | 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, |
| | | }); |
| | | /** |
| | |
| | | // 捕获响应 |
| | | 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) : ''), |
| | | }); |