We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hook有這個
onreadystatechange:function(xhr,event){ console.log("onreadystatechange called: %O") //返回false表示不阻断,拦截函数执行完后会接着执行真正的xhr.onreadystatechange回调. //返回true则表示阻断,拦截函数执行完后将不会执行xhr.onreadystatechange. return false },
如果我想在proxy中onRequest像上面一個整個bypass不進入任何onResponse onError, 有方法嗎 (連handler.next(config)都不跑,直接原生較快也不會對我不處理的request出現bug)
handler.next(config)
ah.proxy({ onRequest: (config, handler) => { if(config.url == 'xxxxxxxx'){ // handler.bypass()?? } // handler.next(config) }, ... })
The text was updated successfully, but these errors were encountered:
onConfig
不调用 handler.next 就可以,只有调用了之后,才会真正调用 open 和 send 方法,下面这个是 next 方法
Sorry, something went wrong.
你誤會了 現在機制是 ah 把整個hack了然後交給裡面的onRequest onResponse處理 很多時因為bug或者是什麼,其實都不用把所有request都處理 不需要理會的網址直接交回原生的處理就好 現在只能透過onRequest onResponse裡面都設一個handler.next
我意思是,在open 的階段,做一個onConfig, 可以直接濾掉不需理會的網址 (onRequest做不到原因是大多數都是async=true)
Successfully merging a pull request may close this issue.
hook有這個
如果我想在proxy中onRequest像上面一個整個bypass不進入任何onResponse onError, 有方法嗎
(連
handler.next(config)
都不跑,直接原生較快也不會對我不處理的request出現bug)The text was updated successfully, but these errors were encountered: