reqwest.cookie_store

reqwest.cookie_store

reqwest.cookie_store

Function

Enables or disables cookie storage for the current requesting client. When enabled, the Set-Cookie written by the server during the redirection process will continue to be carried in subsequent jump requests.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
enabledBoolNotrueWhether to enable cookie storage.

Return value

TypeDescription
ReqwestReturns the current request builder clone.

Example

Notes

  • After cookie storage is enabled, the Set-Cookie received during the redirection process will only continue to be carried in this send() and its redirection link.
  • cookie_store(true) requests will not enter the shared HTTP client pool to avoid sharing cookie status between different requests.