Then, you can pass the API configuration to Retrofit, and you will get back a Java class implementation of your interface. With Retrofit, all you need to do is declare a Java interface to represent your API. If you are curious, you can check the following resources after reading this article:Īccording to the official website, Retrofit is a type-safe HTTP client for Java and Android which was developed by Square. As you can imagine, there is much more when it comes to the RESTful architecture. The explanation above is just a quick introduction, so you know what this is all about. In this article, you will develop a Spring Boot app that is a RESTful client because it follows this constraints to communicate with a RESTful API ( GitHub's API). In REST, GET requests should be used for resource lookup and PUT, POST, DELETE for updating,Ĭreating, and deleting a resource respectively. REST is not a standard but rather a set of constraints used to design web APIs in REST, which stands for Representational State Transfer, is an architectural style used to design web APIs Some basic to intermediate knowledge of the Java programming language).Some knowledge around the HTTP protocol.A basic understanding of the client-server architecture.An external HTTP client like curl, Postman, or whatever.A mature IDE (Integrated Development Environment) of your choice (i.e., IntelliJ, Netbeans, or Eclipse). JDK 8 or greater (JDK 10 was used in this article).To follow this article along, you will need to have the following:
0 Comments
Leave a Reply. |