Skip to content

feat: Added max redirects option parameter#55

Merged
0x676e67 merged 2 commits intomainfrom
feat
Feb 22, 2025
Merged

feat: Added max redirects option parameter#55
0x676e67 merged 2 commits intomainfrom
feat

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

This pull request introduces a new feature to handle the maximum number of redirects in HTTP requests. The changes span across multiple files, including both Python interface definitions and Rust implementation files.

Key Changes:

Python Interface Updates:

  • rnet.pyi: Added max_redirects as an optional integer parameter to both ClientParams and RequestParams classes. [1] [2]

Rust Implementation Updates:

  • src/client.rs: Updated the Client and execute_request functions to use the new max_redirects parameter, applying a limited policy if specified. [1] [2]
  • src/param/client.rs: Added max_redirects as an optional field in the ClientParams struct, with documentation.
  • src/param/request.rs: Added max_redirects as an optional field in the RequestParams struct, with documentation, and updated the FromPyObject implementation to extract this new parameter. [1] [2]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant