Skip to content

feat(client): Added thread-safe update client#36

Merged
0x676e67 merged 4 commits intomainfrom
feat
Feb 18, 2025
Merged

feat(client): Added thread-safe update client#36
0x676e67 merged 4 commits intomainfrom
feat

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

This pull request includes several changes to improve the functionality and maintainability of the rnet library. The changes focus on enhancing the Client class, adding new functionality, and improving error handling.

Enhancements to Client class:

  • Added new methods get_cookies, set_cookies, and update to the Client class in rnet.pyi to manage cookies and update client parameters.
  • Modified Client struct to use ArcSwap for thread-safe updates and added new methods to retrieve user agent and headers in src/client.rs. [1] [2]
  • Updated HTTP request methods to use the load method of ArcSwap for better performance and thread safety in src/client.rs. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Error handling improvements:

  • Added new error handling functions wrap_invali_header_value_error and wrap_url_parse_error in src/error.rs to provide more specific error messages.

New parameter class:

  • Introduced UpdateClientParams class in rnet.pyi and src/param/client.rs to encapsulate parameters for updating the client. [1] [2]

Dependency updates:

  • Added url dependency in Cargo.toml to support URL parsing.

@0x676e67 0x676e67 changed the title feat(client): Support thread-safe update client feat(client): Added thread-safe update client Feb 18, 2025
@0x676e67 0x676e67 merged commit 9890224 into main Feb 18, 2025
@0x676e67 0x676e67 deleted the feat branch February 18, 2025 07:32
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