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

Allow setting recv_timeout when sending request #4

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

felixyz
Copy link

@felixyz felixyz commented Jan 19, 2024

I needed a longer timeout so added the ability to set it manually. Happy to refactor if would risk breaking anyone's code (if they are calling send_bits directly).

@lpil
Copy link
Member

lpil commented Jan 20, 2024

Hello! Aye you're right, we'll need to adjust a bit to avoid breaking existing code.

It would be nice to also leave the door open for more configuration. Perhaps we could provide another API here using the builder pattern?

request
|> hackney.configure
|> hackney.receive_timeout_ms(5000)
|> hackney.dispatch_bits

@felixyz
Copy link
Author

felixyz commented Jan 23, 2024

I guess I should at least have run the tests 😇

@lpil Yes builder is clearly the way to go. I'm on it.

@lpil lpil marked this pull request as draft March 6, 2024 13:11
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.

2 participants