diff --git a/curl_cffi/requests/__init__.py b/curl_cffi/requests/__init__.py index 804dbe0..41deb97 100644 --- a/curl_cffi/requests/__init__.py +++ b/curl_cffi/requests/__init__.py @@ -173,3 +173,5 @@ def request( patch = partial(request, "PATCH") delete = partial(request, "DELETE") options = partial(request, "OPTIONS") +trace = partial(request, "TRACE") +query = partial(request, "QUERY") diff --git a/curl_cffi/requests/session.py b/curl_cffi/requests/session.py index 3130220..9edbcef 100644 --- a/curl_cffi/requests/session.py +++ b/curl_cffi/requests/session.py @@ -94,7 +94,7 @@ class BaseSessionParams(TypedDict, total=False): BaseSessionParams = TypedDict ThreadType = Literal["eventlet", "gevent"] -HttpMethod = Literal["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "TRACE", "PATCH"] +HttpMethod = Literal["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "TRACE", "PATCH", "QUERY"] def _is_absolute_url(url: str) -> bool: @@ -1080,6 +1080,8 @@ def cleanup(fut): patch = partialmethod(request, "PATCH") delete = partialmethod(request, "DELETE") options = partialmethod(request, "OPTIONS") + trace = partialmethod(request, "TRACE") + query = partialmethod(request, "QUERY") class AsyncSession(BaseSession): @@ -1364,3 +1366,5 @@ def cleanup(fut): patch = partialmethod(request, "PATCH") delete = partialmethod(request, "DELETE") options = partialmethod(request, "OPTIONS") + trace = partialmethod(request, "TRACE") + query = partialmethod(request, "QUERY")