How to use REST when using Java?

I am using Spring MVC and want to create a website that uses the REST API provided by LinkedIn. I am very new to REST and have no idea how to use REST and retrieve data. I want a complete tutorial to start with my REST application. Please help me with this.

0
source share
2 answers

To use RESTful services, the main class provided by spring is RestTemplate

The spring blog has a good article on how to use RestTemplate .

A very simplified example:

class MyServiceClient {

    RestTemplate rest = new RestTemplate();

    public String get(String thingy){
        return rest.get("http://www.example.com/api/stuff/{thingy}", String.class, thingy);
    }
}     
+1
source

rest4j. Spring, Spring MVC, rest4j .

Java JSON, ORM.

0

Source: https://habr.com/ru/post/1537219/


All Articles