|
|
Container PatternFrom $1目次ヘッダーがありませんThe container pattern builds on the entity pattern by providing the means to dynamically add and/or update nested resources. For example, in the case of our blog resource, we could not reliably determine the name of the blog post resource, because of race conditions. In this case, we need to use a POST operation to add the nested resource. POST http://myserver/myblog A contents of the POST request must contain enough information about the intended operation to be carried out. For example, it might be used to add one or more nested resources. Regardless of specifics, the POST operation can only affect the resource and its nested resources. When a nested resource is created, the POST response should contain the location of the new resource. Also, if the POST operation can modify the resource before creating it, it should include the updated resource in its response. The Atom Publishing Protocol is an excellent example of applying the container pattern to create a blogging application interface. A container resource has the following pattern:
タグ:
|
|||||||||||||||||||||||||||