Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpURLConnection con = (HttpURLConnection) new URL ("http://localhost:8080/engineerproject/webresources/CategoryService/categories").openConnection();
- BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
- System.out.println("Readline" + br.readLine());
- // List<CategoryApi> lista = new Gson().fromJson(br.readLine(), new TypeToken<List<CategoryApi>>(){}.getType());
- CategoryApi obj = new Gson().fromJson(br.readLine(), CategoryApi.class);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement