blob: 2b80f43452ba7f2b05c1861a96aae0e293f6d709 (
plain)
1
2
3
4
5
6
7
|
from starlette.requests import HTTPConnection
def get_path_with_query_string(connection: HTTPConnection) -> str:
path = connection.url.path
query_string = '?' + connection.scope['query_string'].decode() if connection.scope['query_string'] else ''
return f"{path}{query_string}"
|