Skip to content

Commit

Permalink
Use orjson if present
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Aug 7, 2024
1 parent 10255cc commit cc893e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion curl_cffi/requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
import re
import warnings
from concurrent.futures import Future
from json import loads
from typing import Any, Awaitable, Callable, Dict, List, Optional, Union

from .. import Curl
from .cookies import Cookies
from .exceptions import HTTPError, RequestException
from .headers import Headers

# Use orjson if present
try:
from orjson import loads
except ImportError:
from json import loads

CHARSET_RE = re.compile(r"charset=([\w-]+)")


Expand Down

0 comments on commit cc893e3

Please sign in to comment.