Looly 6 years ago
parent
commit
a3afad68df
1 changed files with 12 additions and 0 deletions
  1. 12 0
      hutool-http/src/test/java/cn/hutool/http/test/HttpUtilTest.java

+ 12 - 0
hutool-http/src/test/java/cn/hutool/http/test/HttpUtilTest.java

@@ -27,6 +27,18 @@ public class HttpUtilTest {
 
 	@Test
 	@Ignore
+	public void postTest2() {
+		// 某些接口对Accept头有特殊要求,此处自定义头
+		String result = HttpUtil
+				.createPost("http://cmp.ishanghome.com/cmp/v1/community/queryClusterCommunity")
+				.header(Header.ACCEPT, "*/*")
+				.execute()
+				.body();
+		Console.log(result);
+	}
+
+	@Test
+	@Ignore
 	public void getTest() {
 		String result1 = HttpUtil.get("http://photo.qzone.qq.com/fcgi-bin/fcg_list_album?uin=88888&outstyle=2", CharsetUtil.CHARSET_GBK);
 		Console.log(result1);