What is the most common/industry standard response code for HTTP PUT when:
- Client made a well-formed request and
- The content of the file/message/data is empty and
- Because of that nothing has been changed on the server/in the database
In my specific case the client sends HTTP PUT with an empty JSON like this:
{}
while I expect something more like this:
{
key1: {
something: value,
something2:value2
},
key2: {
something: value3,
something: value4
}
}
which in my case would translate to 4 new rows being upserted to the database.
I am considering either 400 (because maybe it is a bad request when you call a HTTP PUT but you don't have anything to put there), 200, 204 and 304.
My question is different from this and this because they are about HTTP GET method, and is different from this because while it is about HTTP PUT the answer doesn't address my case.