问题
I understand that 'a' server response to posting an enclosed entity where a new resource is created could be a 'created' plus a location header and a url. That is my normal modus operandi. However I just wrote some server code that, in addition to accepting a single enclosed thing and creating a new resource, also accepts a batch of stuff as an entity and creates multiple resources from it.
As an example, consider /cars. You might post a single new car to make /cars/toyota-camry, or you might post multiple cars at once to result in /cars/toyota-camry, /cars/chevrolet-corvette, etc.
What is the proper response here, if any?
来源:https://stackoverflow.com/questions/28128258/http-post-response-after-multiple-new-resource-creation