Answers for "restTemplate get"

0

resttemplate get rest api call in java

private static void getEmployees()
{
    final String uri = "http://localhost:8080/springrestexample/employees";
 
    //TODO: Autowire the RestTemplate in all the examples
    RestTemplate restTemplate = new RestTemplate();
 
    String result = restTemplate.getForObject(uri, String.class);
    System.out.println(result);
}
Posted by: Guest on March-15-2021
0

resttemplate get rest api call in java

private static void getEmployees()
{
    final String uri = "http://localhost:8080/springrestexample/employees";
    RestTemplate restTemplate = new RestTemplate();
     
    EmployeeListVO result = restTemplate.getForObject(uri, EmployeeListVO.class);
     
    //Use the response
}
Posted by: Guest on March-15-2021

Code answers related to "restTemplate get"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language