REST - Creating Nested Resources with single POST
问题 Thinking in a RESTful way, is it correct to use POST to create in a single call a resource and its sub-resource? In my application I have the resource /notices/{notice} and sub-resource /notices/{notice}/photos/{photo} . A {photo} can't exists without a {notice} , but a {notice} doesn't have necessarily photos. Normally, I have to do first a POST to create a notice, then another POST to add a photo. Now I want to allow the creation of a notice with a photo directly attached, enabling the