|
|
@@ -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);
|