request
Request a response from the underlying `httpx.AsyncClient` client.
Method of TikTokHTTPClient.
Request a response from the underlying httpx.AsyncClient client.
Signature
Section titled “Signature”async def request( url: str, method: str, http_client: Optional[httpx.AsyncClient] = None, extra_params: Optional[Dict] = None, extra_headers: Optional[Dict] = None, base_params: bool = True, base_headers: bool = True, sign_url: bool = False, sign_url_method: Optional[str] = None, sign_url_type: Optional[Literal['xhr', 'fetch']] = None, **kwargs,) -> httpx.ResponseParameters
Section titled “Parameters”url(str) — The URL to requestmethod(str) — The HTTP method to usehttp_client(Optional[httpx.AsyncClient], defaultNone) — An optional override for thehttpx.AsyncClientclientextra_params(Optional[Dict], defaultNone) — Extra parameters to append to the globalsextra_headers(Optional[Dict], defaultNone) — Extra headers to append to the globalsbase_params(bool, defaultTrue) — Whether to include the base paramsbase_headers(bool, defaultTrue) — Whether to include the base headerssign_url(bool, defaultFalse) — Whether to sign the URL before requestingsign_url_method(Optional[str], defaultNone) — The HTTP method to sign withsign_url_type(Optional[Literal['xhr', 'fetch']], defaultNone) — The type of signing to use**kwargs— Optional keywords for thehttpx.AsyncClient.getmethod
Returns
Section titled “Returns”httpx.Response — An httpx.Response object
Import
Section titled “Import”from TikTokLive.client.web.web_base import TikTokHTTPClient