Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time


Kotlin MavenCentral ktlint Run Gradle Codecov

The easiest HTTP networking library for Kotlin backed by Kotlinx Coroutines.


From 3.x onwards, we are using main as our new base branch. If you are finding the old version 2.x, please take a look at our old branch.


For release version


Quick Start

use the any http method suspend function:

runBlocking {
    val string = Fuel.get("").body.string()

runBlocking {
    val string = "".httpGet().body.string()

runBlocking {
    val fuel = FuelBuilder().build()
    val string = fuel.get(request = { url = "" }).body.string()

Custom Configuration

JVM uses OkHttpClient configurations

val fuel = FuelBuilder().config(OKHttpClient()).build()
val string = fuel.get(request = { url = "" }).body.string()

Apple uses NSURLSessionConfiguration

val fuel = FuelBuilder().config(NSURLSessionConfiguration.defaultSessionConfiguration).build()
val string = fuel.get(request = { url = "" }).body.string()

Please note it will throw Exceptions. Make sure you catch it on the production apps.

Fuel requires Java 8 byte code.


  • If you are using Android, It needs to be Android 5+.
  • Java 8+

R8 / Proguard

Fuel is fully compatible with R8 out of the box and doesn't require adding any extra rules.

If you use Proguard, you may need to add rules for Coroutines, OkHttp and Okio.

If you use the fuel-serialization modules, you may need to add rules for Serialization.

If you use the fuel-moshi modules, you may need to add rules for Moshi and Moshi-Kotlin

Other libraries

If you like Fuel, you might also like other libraries of mine;

  • Result - The modelling for success/failure of operations in Kotlin
  • Fuse - A simple generic LRU memory/disk cache for Android written in Kotlin
  • Forge - Functional style JSON parsing written in Kotlin
  • ReactiveAndroid - Reactive events and properties with RxJava for Android SDK


Fuel brought to you by contributors.


Fuel released under the MIT license.