Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #5 from e-yes/compat_recent_aiohttp
Browse files Browse the repository at this point in the history
Use wildcard request method specification.
  • Loading branch information
Hardtack committed Mar 6, 2016
2 parents 6a92318 + ee455f7 commit a1aaa68
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions flask_aiohttp/__init__.py
Expand Up @@ -114,10 +114,8 @@ def create_aiohttp_app(self, app: flask.Flask) -> aiohttp.web.Application:
# WSGI handler for aiohttp
wsgi_handler = self.handler_factory(app)

# aiohttp's router should accept HTTP method of request.
# So we add routers for each HTTP methods.
for method in aio_app.router.METHODS:
aio_app.router.add_route(method, r'/{path:.*}', wsgi_handler)
# aiohttp's router should accept any possible HTTP method of request.
aio_app.router.add_route('*', r'/{path:.*}', wsgi_handler)
return aio_app

@staticmethod
Expand Down

0 comments on commit a1aaa68

Please sign in to comment.