FlorianREGAZ / Python-Tls-Client

Advanced HTTP Library
MIT License
678 stars 135 forks source link

Auto Redirect #29

Closed dev7machine closed 1 year ago

dev7machine commented 1 year ago

Is there auto redirect flag for tls_client?

gbe3hunna commented 1 year ago

As stated in the execute_request method parameters, you can use allow_redirects which is False by default:

def execute_request(
        self,
        method: str,
        url: str,
        params: Optional[dict] = None,  # Optional[dict[str, str]]
        data: Optional[Union[str, dict]] = None,
        headers: Optional[dict] = None,  # Optional[dict[str, str]]
        cookies: Optional[dict] = None,  # Optional[dict[str, str]]
        json: Optional[dict] = None,  # Optional[dict]
        allow_redirects: Optional[bool] = False,
        insecure_skip_verify: Optional[bool] = False,
        timeout_seconds: Optional[int] = 30,
        proxy: Optional[dict] = None  # Optional[dict[str, str]]
    ):
dev7machine commented 1 year ago

Thanks.