kotlinfuel

Use FuelManager instance instead of global config for requests


fuel docs mention the possibility to create a FuelManager instance for not-global config:

Create separate managers using FuelManager()

However I haven't found a way to use an instance of FuelManager instead of the global one in making a request. What do I have to do?


Solution

  • FuelManager offers functions to make HTTP calls directly, so you can/should use the (configured) instance.
    Note: Avoid e.g. Fuel#get since then you'd use the global FuelManagerconfig.