Skip to content

[Docs] Clarify behavior of timeout parameter in requests.get #7350

Description

@MA-Hamodi

Description

The current documentation for the timeout parameter in requests.get() does not clearly explain that it applies to both connection and read timeouts unless specified otherwise.

This can be confusing for users who expect it to behave as a total request timeout.

Suggested Improvement

Add clarification in the docs that:

  • A single float applies to both connect and read timeouts
  • A tuple can be used to specify them separately

Example:

requests.get(url, timeout=(connect_timeout, read_timeout))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions