Revision 88394aa7 lib/rapi/rlib2.py
b/lib/rapi/rlib2.py | ||
---|---|---|
21 | 21 |
|
22 | 22 |
"""Remote API version 2 baserlib.library. |
23 | 23 |
|
24 |
PUT or POST? |
|
25 |
------------ |
|
26 |
|
|
27 |
According to RFC2616 the main difference between PUT and POST is that |
|
28 |
POST can create new resources but PUT can only create the resource the |
|
29 |
URI was pointing to on the PUT request. |
|
30 |
|
|
31 |
To be in context of this module for instance creation POST on |
|
32 |
/2/instances is legitim while PUT would be not, due to it does create a |
|
33 |
new entity and not just replace /2/instances with it. |
|
34 |
|
|
35 |
So when adding new methods, if they are operating on the URI entity itself, |
|
36 |
PUT should be prefered over POST. |
|
37 |
|
|
24 | 38 |
""" |
25 | 39 |
|
26 | 40 |
# pylint: disable-msg=C0103 |
Also available in: Unified diff