fix: httpx fix as per latest version (#25)

This commit is contained in:
vikynoah
2024-12-09 16:28:44 +01:00
committed by GitHub
parent 2176b1a37d
commit 2a22471de9

View File

@@ -1,10 +1,10 @@
import json
from httpx import AsyncClient
from httpx import AsyncClient, ASGITransport
class AsyncGenericClient:
def __init__(self, app):
self.c = AsyncClient(app=app, base_url="http://testserver", follow_redirects=True)
self.c = AsyncClient(transport=ASGITransport(app=app), base_url="http://testserver", follow_redirects=True)
self.default_headers = {}
async def get(self, url: str, r_code: int = 200, parse_json=True):