Concept Flow - 200 OK and 201 Created
Client sends HTTP request
Server processes request
Check if resource created?
Yes→Respond with 201 Created
No
Respond with 200 OK
Client receives response
The server checks if a new resource was created. If yes, it sends 201 Created; otherwise, it sends 200 OK.