HttpClientFactory improvement
Closed this issue · 0 comments
matheusribeirozup commented
Use case
The HttpClientFactory
contract is how the Beagle gets an instance of the HttpClient
.
interface HttpClientFactory {
fun create(): HttpClient
}
If the user wants to have more than one client for the application, he can. However, deciding when to use it is difficult given the current contract.
Proposal
Provide through the method create
information for each request for him to decide from each request, which client to use.
interface HttpClientFactory {
fun create(requestData: RequestData): HttpClient
}