import hu.szit.ResClientAsync; public class UseResclient { public static void get() { String url = "https://jsonplaceholder.typicode.com/users"; ResClientAsync client = new ResClientAsync(); String res = client.get(url).join(); System.out.println(res); } public static void post() { String url = "https://jsonplaceholder.typicode.com/users"; ResClientAsync client = new ResClientAsync(); String body = "{\"name\":\"John\", \"age\":30, \"city\":\"New York\"}"; String res = client.post(url, body).join(); System.out.println(res); } public static void put() { String url = "https://jsonplaceholder.typicode.com/users/1"; ResClientAsync client = new ResClientAsync(); String body = "{\"name\":\"John\", \"age\":30, \"city\":\"New York\"}"; String res = client.put(url, body).join(); System.out.println(res); } public static void delete() { String url = "https://jsonplaceholder.typicode.com/users/1"; ResClientAsync client = new ResClientAsync(); String res = client.delete(url).join(); System.out.println(res); } }