Skip to content

Commit f2ae100

Browse files
committed
Document post once functions.
1 parent c49a0f5 commit f2ae100

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roundup/rest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,8 @@ def post_collection(self, class_name, input):
10641064
@Routing.route("/data/<:class_name>/@poe", 'POST')
10651065
@_data_decorator
10661066
def get_post_once_exactly(self, class_name, input):
1067+
"""Get the Post Once Exactly token to create a new instance of class
1068+
See https://tools.ietf.org/html/draft-nottingham-http-poe-00"""
10671069
otks = self.db.Otk
10681070
poe_key = ''.join([random_.choice(chars) for x in range(40)])
10691071
while otks.exists(u2s(poe_key)):
@@ -1108,6 +1110,7 @@ def get_post_once_exactly(self, class_name, input):
11081110
@Routing.route("/data/<:class_name>/@poe/<:post_token>", 'POST')
11091111
@_data_decorator
11101112
def post_once_exactly_collection(self, class_name, post_token, input):
1113+
"""Post exactly one to the resource named by class_name"""
11111114
otks = self.db.Otk
11121115

11131116
# remove expired keys so we don't use an expired key

0 commit comments

Comments
 (0)