urllib3.request()#
- urllib3.request(method, url, *, body=None, fields=None, headers=None, preload_content=True, decode_content=True, redirect=True, retries=None, timeout=3, json=None)#
A convenience, top-level request method. It uses a module-global
PoolManager
instance. Therefore, its side effects could be shared across dependencies relying on it. To avoid side effects create a newPoolManager
instance and use it instead. The method does not accept low-level**urlopen_kw
keyword arguments.- Parameters
method (str) –
url (str) –
body (Optional[Union[bytes, IO[Any], Iterable[bytes], str]]) –
fields (Optional[Union[Sequence[Union[Tuple[str, Union[str, bytes, Tuple[str, Union[str, bytes]], Tuple[str, Union[str, bytes], str]]], RequestField]], Mapping[str, Union[str, bytes, Tuple[str, Union[str, bytes]], Tuple[str, Union[str, bytes], str]]]]]) –
preload_content (bool | None) –
decode_content (bool | None) –
redirect (bool | None) –
retries (urllib3.util.retry.Retry | bool | int | None) –
timeout (urllib3.util.timeout.Timeout | float | int | None) –
json (Any | None) –
- Return type