mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-09-27 19:51:02 -04:00
daemon: Add some documentation to the daemon methods.
This commit is contained in:
parent
1c45fabe9f
commit
3fa6ce9292
1 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,15 @@ class ProxyDaemon:
|
||||||
return access_token
|
return access_token
|
||||||
|
|
||||||
async def forward_request(self, request, session):
|
async def forward_request(self, request, session):
|
||||||
|
# type: (aiohttp.BaseRequest, aiohttp.ClientSession) -> str
|
||||||
|
"""Forward the given request to our configured homeserver.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
request (aiohttp.BaseRequest): The request that should be
|
||||||
|
forwarded.
|
||||||
|
session (aiohttp.ClientSession): The client session that should be
|
||||||
|
used to forward the request.
|
||||||
|
"""
|
||||||
path = request.path
|
path = request.path
|
||||||
method = request.method
|
method = request.method
|
||||||
data = await request.text()
|
data = await request.text()
|
||||||
|
@ -74,6 +83,7 @@ class ProxyDaemon:
|
||||||
)
|
)
|
||||||
|
|
||||||
async def router(self, request):
|
async def router(self, request):
|
||||||
|
"""Catchall request router."""
|
||||||
session = None
|
session = None
|
||||||
|
|
||||||
token = self.get_access_token(request)
|
token = self.get_access_token(request)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue