mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e44453915 | ||
|
|
2a22471de9 |
@@ -1,10 +1,12 @@
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user