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

feat: allow sending non String payload with execute #665

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

loispostula
Copy link
Contributor

resolves #360

The approach I took is similar to the one outline here: #360 (comment)

Breaking changes

Drop of internal retry policy handler

Having to clone the request is a real challenge, as stated here: #360 (comment) and hyperium/tonic#733. I am in the opinion that such behaviour should not be inside of this library but in the client code, where they can use tools like tryhard to achieve reliable retry mechanism.

  • the execute API has changed, so anyone using it outside of the crate might have to impact their code

@XAMPPRocky
Copy link
Owner

Thank you for your PR!

I am in the opinion that such behaviour should not be inside of this library but in the client code, where they can use tools like tryhard to achieve reliable retry mechanism.

I do not agree with this opinion, the octocrab client should be able of handling retries and throttling, just like the existing octokit client. I'm not going to merge a solution that removes this functionality. It may be a challenge but this is functionality that is worth preserving. If you're willing to make changes to this PR to support cloning streaming bodies, I'd be happy to merge it.

@loispostula
Copy link
Contributor Author

@XAMPPRocky I' ve updated the pr to allow cloning the request by changng OctoBody<BoxBody> to OctoBody<Arc<RwLock<BoxBody>>>

@XAMPPRocky
Copy link
Owner

Thank you for your PR, and congrats on your first contribution! 🎉

@XAMPPRocky XAMPPRocky merged commit 6ef99b8 into XAMPPRocky:main Jul 26, 2024
11 checks passed
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.

Sending non-String HTTP request bodies no longer supported?
2 participants