Web: add support for the POST HTTP method. (#1097)
* Web: add support for the POST HTTP method. This patch adds support for POST in addition to the already supported GET. This is needed for implementing more complex web modules that also support configuration modifications and advanced queries. * Base web: return METHOD_NOT_ALLOWED when method isn't implemenetd. Co-authored-by: Unrud <Unrud@users.noreply.github.com>
This commit is contained in:
@@ -27,3 +27,6 @@ from radicale import web
|
||||
class Web(web.BaseWeb):
|
||||
def get(self, environ, base_prefix, path, user):
|
||||
return client.OK, {"Content-Type": "text/plain"}, "custom"
|
||||
|
||||
def post(self, environ, base_prefix, path, user):
|
||||
return client.OK, {"Content-Type": "text/plain"}, "custom post"
|
||||
|
||||
Reference in New Issue
Block a user