我可能遗漏了一些愚蠢的东西,但我无法让HttpInterceptor工作。基于几个示例(x x x)和API参考,我编写了这个代码,当新页面被路由到时,它似乎没有做任何事情。< / p>
Injector inj = applicationFactory().addModule(new MyClient()).run();
RequestInterceptor intercept = (HttpResponseConfig res) => print("TEST");
inj.get(HttpInterceptors).add(
new HttpInterceptor()..request = intercept
);