fuel
fuel copied to clipboard
Make it easier to mock Fuel behavior in v3
For testing purposes one needs to set Fuel up to mock the behavior. You do provide:
public fun setHttpLoader(loader: HttpLoader)
public fun setHttpLoader(factory: HttpLoaderFactory)
But those are kind of unusable, since they are all about HttpLoader, which is an actual/expect class and is final so it is not possible to actually create a custom version of HttpLoader.
HttpLoader needs to be an interface. It would be cleaner you instead created a global val defaultHttpLoader that was expect/actual rather than trying to have an expect actual class.
Should this to be closed?