Update dependencies to use httpx2 and refactor tests for compatibility
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ import random
|
||||
from collections.abc import Awaitable, Callable
|
||||
from datetime import UTC, datetime
|
||||
|
||||
import httpx
|
||||
import httpx2
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import async_sessionmaker
|
||||
|
||||
@@ -37,7 +37,7 @@ class WebhookClient:
|
||||
self._timeout = timeout
|
||||
|
||||
async def send(self, url: str, payload: PaymentWebhook) -> None:
|
||||
async with httpx.AsyncClient(timeout=self._timeout) as client:
|
||||
async with httpx2.AsyncClient(timeout=self._timeout) as client:
|
||||
response = await client.post(url, json=payload.model_dump(mode="json"))
|
||||
response.raise_for_status()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user