I need to create an endpoint that loads a server cache when called (for instance "POST cache/load") but I don't want that endpoint to load the cache if it's already loaded. Therefore, I want to differentiate, in my responses, the two following cases :
Now the question is, what are the appropriate HTTP response codes ?
I currently use 201 when the cache has been loaded and 200 if the cache is already loaded.
Now the question is, what are the appropriate HTTP response codes ?
200 for both. That's all that the components in the transfer of documents over a network domain need to know.
The implementation specific details belong in the body of the response.