import org.httpz.*; public class HttpzExample { public static void main(String[] args) { HttpClient client = Httpz.client(); Response response = client.get("https://api.example.com/data") .param("param1", "value1") .param("param2", "value2") .execute(); System.out.println(response.getBody()); response = client.post("https://api.example.com/data") .body("request body content") .execute(); System.out.println(response.getStatus()); client.close(); } }


上一篇:
下一篇:
切换中文