为了拦截获取请求和参数,我们可以采用下面提到的方法。它解决了我的问题。
const constantMock = window.fetch; window.fetch = function() { // Get the parameter in arguments // Intercept the parameter here return constantMock.apply(this, arguments) }
为了拦截获取请求和参数,我们可以采用下面提到的方法。它解决了我的问题。
const constantMock = window.fetch; window.fetch = function() { // Get the parameter in arguments // Intercept the parameter here return constantMock.apply(this, arguments) }