Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. HttpURLConnection con = (HttpURLConnection) new URL ("http://localhost:8080/engineerproject/webresources/CategoryService/categories").openConnection();
  2.             BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
  3.             System.out.println("Readline" + br.readLine());
  4. //             List<CategoryApi> lista =  new Gson().fromJson(br.readLine(), new TypeToken<List<CategoryApi>>(){}.getType());
  5.              CategoryApi obj =  new Gson().fromJson(br.readLine(), CategoryApi.class);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement