mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add HttpConfig
This commit is contained in:
@@ -171,13 +171,16 @@ public class HttpRequestTest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void addInterceptorTest() {
|
||||
HttpUtil.createGet("https://hutool.cn").addInterceptor(Console::log).execute();
|
||||
HttpUtil.createGet("https://hutool.cn")
|
||||
.addInterceptor(Console::log)
|
||||
.addResponseInterceptor((res)-> Console.log(res.getStatus()))
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void addGlobalInterceptorTest() {
|
||||
GlobalInterceptor.INSTANCE.addInterceptor(Console::log);
|
||||
GlobalInterceptor.INSTANCE.addRequestInterceptor(Console::log);
|
||||
HttpUtil.createGet("https://hutool.cn").execute();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user