Skip to content

Commit

Permalink
Add support for HTTP PUT (#9)
Browse files Browse the repository at this point in the history
* Add .idea to .gitignore

* Add support for HTTP PUT

Resolves #6

* Update version
  • Loading branch information
pristupa authored and mofr committed Jan 30, 2019
1 parent b8750f4 commit 15f3aa8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ dmypy.json

# Pyre type checker
.pyre/

# IDE
.idea/
1 change: 1 addition & 0 deletions winter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .routing import route_get
from .routing import route_patch
from .routing import route_post
from .routing import route_put


def _default_configuration():
Expand Down
2 changes: 1 addition & 1 deletion winter/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0'
__version__ = '1.0.1'
4 changes: 4 additions & 0 deletions winter/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def route_patch(url_path=''):
return route(url_path, 'PATCH')


def route_put(url_path=''):
return route(url_path, 'PUT')


def register_route(func, url_path, http_method):
assert func not in _routes, f'{func} is already mapped to a route'
_routes[func] = Route(url_path, http_method)
Expand Down

0 comments on commit 15f3aa8

Please sign in to comment.