Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReqwestRequestExecutor behind reqwest-request-executor Cargo feature #613

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

oguzkocer
Copy link
Contributor

This PR moves the wp_api_integration_tests::AsyncWpNetworking to wp_api crate by renaming it to reqwest_request_executor::ReqwestRequestExecutor. It also removes the ReqwestRequestExecutor::Default implementation in favor ReqwestRequestExecutor::new(danger_accept_invalid_certs: bool), since in production accepting invalid certificates is probably not the client would want. Note that, both reqwest_request_executor module and the reqwest dependency are behind reqwest-request-executor Cargo feature.

ReqwestRequestExecutor in its current state is probably not ready to be used in production. We have a couple unwraps we should remove and turn into appropriate errors. We are also lacking some of the extra error handling Swift client has. Having said that, I think it's best to make this move without any functional changes and open subsequent PRs for improvements. @jkmassel is already working on such improvements at the moment, so I don't want to create any conflicts with that.

@oguzkocer oguzkocer added the Rust label Mar 14, 2025
@oguzkocer oguzkocer added this to the 0.2 milestone Mar 14, 2025
@oguzkocer oguzkocer marked this pull request as ready for review March 14, 2025 19:09
@oguzkocer oguzkocer enabled auto-merge (squash) March 14, 2025 19:09
@oguzkocer oguzkocer requested a review from a team March 14, 2025 19:09
Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a pretty simple move of the request executor in to wp-api, so I think we should marge it then I'll rebase #610 on top of it and try out the test suite

@oguzkocer oguzkocer merged commit 88cb55d into trunk Mar 14, 2025
19 checks passed
@oguzkocer oguzkocer deleted the wp_api_request_executor branch March 14, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants