mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add toString for HttpRequest
This commit is contained in:
@@ -41,15 +41,11 @@ public class HttpRequestTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void getWithParamsTest() {
|
||||
public void toStringTest() {
|
||||
String url = "http://gc.ditu.aliyun.com/geocoding?ccc=你好";
|
||||
|
||||
HttpRequest request = HttpRequest.get(url).setEncodeUrlParams(true).body("a=乌海");
|
||||
String body = request.execute().body();
|
||||
Console.log(body);
|
||||
|
||||
// String body2 = HttpUtil.get(url);
|
||||
// Console.log(body2);
|
||||
HttpRequest request = HttpRequest.get(url).body("a=乌海");
|
||||
Console.log(request.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user