Skip to content

Commit

Permalink
Add requests methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Jan 31, 2023
1 parent 4234bde commit 0476854
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ajenti-core/aj/api/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def decorator(f):
return request_decorator

# Decorators like @get and @post are defined here
for method in ['get', 'post', 'delete', 'head', 'put', 'patch']:
http_methods = ['get', 'post', 'delete', 'head', 'put', 'patch']
webdav_methods = ['propfind', 'mkcol', 'options', 'proppatch', 'copy', 'move', 'lock', 'unlock']

for method in http_methods + webdav_methods:
globals()[method] = requests_decorator_generator(method)

class BaseHttpHandler():
Expand Down

0 comments on commit 0476854

Please sign in to comment.