Switched HTTP client JSON serialization to orjson for outgoing requests.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 13s
CI / Tests (Python 3.13) (push) Successful in 13s
CI / Tests (Python 3.14) (push) Successful in 10s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-04-10 11:00:53 -04:00
parent 0d718b3ba0
commit 0b28ec39d0
+2
View File
@@ -23,6 +23,7 @@ import logging
from typing import Any
import aiohttp
import orjson
logger = logging.getLogger("owlbot.http")
@@ -68,6 +69,7 @@ class HttpClient:
self._session = aiohttp.ClientSession(
connector=connector,
timeout=timeout,
json_serialize=lambda obj: orjson.dumps(obj).decode(),
headers={
"User-Agent": (
f"Owlbot/{__version__} "