Spring Boot Tutorial | Spring Boot 3 Full Course in 15 Hours π₯[2025 Edition]
Implementing POST Our REST API can now fetch Cash Cards with a specific ID. In this lesson, you’ll add the Create endpoint to the API. Four questions we’ll need to answer while doing this are: Who...
About This Course
Implementing POST
Our REST API can now fetch Cash Cards with a specific ID. In this lesson, you’ll add the Create endpoint to the API.
Four questions we’ll need to answer while doing this are:
- Who specifies the ID - the client, or the server?
- In the API Request, how do we represent the object to be created?
- Which HTTP method should we use in the Request?
- What does the API send as a Response?
Let’s start by answering the first question: “Who specifies the ID?” In reality, this is up to the API creator! REST is not exactly a standard; it’s merely a way to use HTTP to perform data operations. REST contains a number of guidelines, many of which we’re following in this course.
Here we’ll choose to let the server create the ID. Why? Because it’s the simplest solution, and databases are efficient at managing unique IDs. However, for completeness, let’s discuss our alternatives:
- We could require the client to provide the ID. This might make sense if there were a pre-existing unique ID, but that’s not the case.
- We could allow the client to provide the ID optionally (and create it on the server if the client does not supply it). However, we don’t have a requirement to do this, and it would complicate our application. If you think you might want to do this “just in case”, the Yagni article (link in the References section) might dissuade you.
Course Curriculum
-
Course Content
-
Generate Amazing REST API Documentation in 1 Step in Spring Boot Projects #springboot #java
Microservice architectures are the βnew normalβ. Building small, self-contained, ready to run applications can bring gre...
-
Generate Amazing REST API Documentation in 1 Step in Spring Boot Projects #springboot #java
Microservice architectures are the βnew normalβ. Building small, self-contained, ready to run applications can bring gre...
-
Chap 3
Dealing With Failed JobsSometimes your queued jobs will fail. Don't worry, things don't always go as planned! Laravel in...
-
Instructor

Reviews (0)
You must login to leave a review
Generate Amazing REST API Documentation in 1 Step in Spring Boot Projects #springboot #java
none
Generate Amazing REST API Documentation in 1 Step in Spring Boot Projects #springboot #java
none
Chap 3
none