This commit is contained in:
Looly
2022-10-25 10:49:33 +08:00
parent 267e16e9c1
commit b1caf395d9
10 changed files with 173 additions and 40 deletions

View File

@@ -1,5 +1,6 @@
package cn.hutool.http;
import cn.hutool.http.html.HtmlUtil;
import org.junit.Assert;
import org.junit.Test;

View File

@@ -115,9 +115,11 @@ public class HttpRequestTest {
@Test
@Ignore
public void getDeflateTest() {
final String res = HttpRequest.get("https://comment.bilibili.com/67573272.xml")
.execute().body();
Console.log(res);
final HttpResponse res = HttpRequest.get("https://comment.bilibili.com/67573272.xml")
.header(Header.ACCEPT_ENCODING, "deflate")
.execute();
Console.log(res.header(Header.CONTENT_ENCODING));
Console.log(res.body());
}
@Test