Recently, I struggled with this, and that's what I work for.
If the POST adding multiple resources succeeds, return 200 OK (I examined 201, but the user does not ultimately land on the created resource) along with a page that displays all the added resources, either in read-only mode, or in editable form. For example, a user can select and POST multiple images to a gallery using a form containing only one input file. If the POST request is completely completed, the user is provided with a set of forms for each created representation of the image resource, which allows them to specify more detailed information about each (name, description, etc.).
If it is impossible to create one or more resources, the POST handler cancels all processing and adds each individual error message to the array. Then, the 419 Conflict is returned, and the user is redirected to the 419 Conflict error page, which represents the contents of the error array, as well as the path back to the form that was submitted.
Eric Fuller Oct 24 '13 at 15:40 2013-10-24 15:40
source share