mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -19,6 +19,7 @@ package org.dromara.hutool.http.client;
|
||||
import org.dromara.hutool.core.io.StreamProgress;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.core.map.MapUtil;
|
||||
import org.dromara.hutool.http.HttpGlobalConfig;
|
||||
import org.dromara.hutool.http.client.engine.ClientEngineFactory;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -50,6 +51,13 @@ public class DownloadTest {
|
||||
Console.log("Download size: " + size);
|
||||
}
|
||||
|
||||
@Test
|
||||
void downloadWithHeaderTest() {
|
||||
HttpDownloader.of("https://hutool.cn/")
|
||||
.header(MapUtil.of("Authorization", "token"))
|
||||
.downloadFile(FileUtil.file("d:/test/"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void downloadTest() {
|
||||
|
Reference in New Issue
Block a user