Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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
}
Source by howtodoinjava.com #
 
PREVIOUS NEXT
Tagged: #resttemplate #rest #api #call #java
ADD COMMENT
Topic
Name
1+2 =