Skip to content

feat[py]: add timeouts, base_url, cookies, follow_redirects; unify Response types#137

Merged
deedy5 merged 5 commits intomainfrom
dev
Apr 3, 2026
Merged

feat[py]: add timeouts, base_url, cookies, follow_redirects; unify Response types#137
deedy5 merged 5 commits intomainfrom
dev

Conversation

@deedy5
Copy link
Copy Markdown
Owner

@deedy5 deedy5 commented Apr 3, 2026

Summary

  • New timeout options: Added connect_timeout and read_timeout parameters to client initialization and per-request configuration
  • Base URL support: Added base_url parameter for resolving relative paths
  • Client cookies: Added cookies parameter to initialize clients with pre-set cookies
  • Per-request redirect control: Added follow_redirects parameter to override client defaults per-request
  • Unified Response types: Merged Response/StreamResponse and AsyncResponse/AsyncStreamResponse into single unified types with a streaming flag
  • Redirect policy: Exposed set_redirect_policy() method on Client for runtime redirect configuration
  • Updated docs, examples, tests, and type stubs to reflect all API changes

Changes by crate

primp-reqwest

  • Add ReadTimeout config type
  • Add read_timeout() method to RequestBuilder
  • Add set_redirect_policy() to Client

primp

  • Expose set_redirect_policy() on Client wrapper

primp-python

  • Add connect_timeout, read_timeout, base_url, cookies, follow_redirects parameters
  • Unify Response/StreamResponse into single Response type
  • Unify AsyncResponse/AsyncStreamResponse into single AsyncResponse type
  • Update type stubs, docs, examples, and tests

@deedy5 deedy5 merged commit 5c4253b into main Apr 3, 2026
53 of 54 checks passed
@deedy5 deedy5 deleted the dev branch April 3, 2026 05:42
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