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

📝 [Proposal]: Add support to create client from existing client #3107

Open
goriunov opened this issue Aug 20, 2024 · 8 comments · May be fixed by #3214
Open

📝 [Proposal]: Add support to create client from existing client #3107

goriunov opened this issue Aug 20, 2024 · 8 comments · May be fixed by #3214

Comments

@goriunov
Copy link

goriunov commented Aug 20, 2024

Feature Proposal Description

I believe there should be a way to pass custom fasthttp client in to the fiber http client, to allow more granular fine tuning by the users.

Alignment with Express API


HTTP RFC Standards Compliance


API Stability


Feature Examples

Naming can be improved but something along the lines:

cc := client.NewWithFasthttpClien(&fasthttp.Client{...})


### Checklist:

- [X] I agree to follow Fiber's [Code of Conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md).
- [X] I have searched for existing issues that describe my proposal before opening this one.
- [X] I understand that a proposal that does not meet these guidelines may be closed without explanation.
Copy link

welcome bot commented Aug 20, 2024

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@gaby
Copy link
Member

gaby commented Aug 20, 2024

@efectn Thoughts? Seems reasonable

@luk3skyw4lker
Copy link
Contributor

Couldn't this also be achieved using an option within the existing New method? One option like CustomFastHttpClient or something that when omitted defaults to the internal Fiber fasthttp client. Not sure if this is good but just throwing ideas here

@gaby gaby added the hacktoberfest 🚀 Open for Hacktoberfest contributions! label Oct 18, 2024
@mitulagr2
Copy link

I'll take this if you'd like!

@gaby gaby removed the hacktoberfest 🚀 Open for Hacktoberfest contributions! label Nov 12, 2024
@gaby
Copy link
Member

gaby commented Nov 12, 2024

@gaby gaby added this to v3 Nov 12, 2024
@gaby gaby moved this to Todo in v3 Nov 12, 2024
@gaby gaby added this to the v3 milestone Nov 12, 2024
@gaby gaby changed the title 📝 [Proposal]: Fiber v3 add function to create client and pass fasthttp custom client in 📝 [Proposal]: Add support to create client from existing client Nov 12, 2024
@efectn
Copy link
Member

efectn commented Nov 22, 2024

I'll take this if you'd like!

Feel free to create a pull request. You can add new method called NewWithFasthttpClient

@mitulagr2
Copy link

Thanks! I'll start working on it.

@gaby
Copy link
Member

gaby commented Nov 23, 2024

@efectn NewWithClient() might be cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

5 participants