Category: REST API
-
How to connect to database from a REST API?
Web applications store data in a database. Doing so , data is stored permanently somewhere so that you can process it later. Even if your application server goes down , you still have the data in your database. Spring makes it easy to connect to any database. You require very minimal code to do this.…
-
How to create a REST API in Spring Boot?
Let’s say you want to create an ecommerce store. And you want to expose REST APIs to the end users to do CRUD(Create, Read , Update and Delete) operations on your store items. You can do this with minimal effort in Spring Boot. Let’s create the REST APIs. Creating a REST API in Spring Boot…
-
Rest API vs HTTP API – Are your REST APIs really REST APIs?
Let’s say you want to create a REST API using a framework like Spring Boot. You create a class annotated with @RestController. And then you create APIs using @RequestMapping/@GetMapping/@PostMapping annotation. Are these really REST APIs? No. They are just HTTP APIs. What is the difference between the two? HTTP is one of the ways information…