Closed Syer10 closed 1 year ago
Kamel uses Ktor's HttpClient. You can configure the HttpClient by a lambda, if that's what you're asking.
I already have a constructed Ktor HttpClient, I would like to use that one in the HttpFetcher. The current API doesn't allow that
Ok, I understand now. I'll add a function that takes an HttpClient as a parameter.
Do you think I should also provide functions for all HttpClient constructor functions?
The functions look cleaner, would there be any reason why you shouldn't?
Well, one reason is that I provided the function you asked for, which already can be used to construct the HttpClient using its own custom parameters. So, I don't think there's a need for that. What do you think?
Maybe just a default one and one that you can pass a already constructed client then. The others are not as useful
Version 0.4.0 is out. Please check it and let me know!
Working as intended 👍 Nice work @alialbaali
For my application I have a Ktor HttpClient that I use everywhere since it is configured for a specific server. Previously I used for construction of the HttpFetcher.
But recently a feature I needed was added to the Kamel HttpClient and it fails to use that feature. Sadly I cant construct the HttpFetcher myself since its internal. To get past this I copied the HttpFetcher and am using it directly passing my HttpClient to it. It would be nice to add this to Kamel like so