explaingit

kittinunf/fuel

4,653KotlinAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Fuel is a Kotlin HTTP library for Android and JVM apps that makes network requests readable and simple, add a Gradle dependency, then fetch URLs and post data in just a few lines using coroutines.

Mindmap

mindmap
  root((fuel))
    What it does
      Make HTTP requests
      Coroutine-based API
      Simple clean syntax
    Tech stack
      Kotlin
      OkHttp
      Coroutines
      Gradle
    Platforms
      Android 5+
      JVM Java 8+
      Apple targets
    Features
      Custom timeouts
      Interceptors
      R8 compatible
    Use cases
      Call web APIs
      Fetch files
      POST form data
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Fetch JSON from a REST API in an Android app using Kotlin coroutines in just a few lines of code.

USE CASE 2

Upload a file or POST form data to a server from a Kotlin JVM or Android app.

USE CASE 3

Configure custom timeouts and HTTP interceptors for all requests in your app from a single place.

USE CASE 4

Replace a verbose OkHttp setup in an existing Android project with Fuel for cleaner, more readable network code.

Tech stack

KotlinOkHttpCoroutinesGradleAndroid

Getting it running

Difficulty · easy Time to first run · 5min

Add one Gradle dependency and you can make requests immediately, no extra configuration needed for R8.

MIT, use freely for any purpose including commercial Android apps, just keep the copyright notice.

In plain English

Fuel is a Kotlin library for making HTTP network requests. When an Android or JVM app needs to call a web API, fetch a file, or send data to a server, it needs an HTTP client to handle the connection details. Fuel is designed to make that as simple as possible by wrapping the underlying mechanics into a clean, readable API. The library is built on top of Kotlin coroutines, which are a way of writing code that waits for network responses without blocking the rest of the app. In practice, this means you can write a network call in a few lines that reads almost like plain instructions: get this URL, read the body as a string, use the result. Setup follows standard Android dependency management: add the library to your Gradle build file and you can start making requests immediately. Under the hood, Fuel uses OkHttp on JVM and Android, and the platform networking layer on Apple targets, so the actual connection handling is delegated to well-tested foundations. Custom configuration is available if you need to set timeouts, interceptors, or other HTTP client options. The library requires Android 5 or later and Java 8 or later on JVM. It is compatible with R8, the code shrinker used in Android release builds, without needing extra configuration. If you use the older Proguard tool, some additional rules may be needed depending on which optional modules you include. Fuel is released under the MIT license. It was created by the same author as several related Kotlin utilities, including libraries for result modeling, caching, and JSON parsing.

Copy-paste prompts

Prompt 1
Show me how to make a GET request in Kotlin using Fuel and parse the JSON response body into a data class.
Prompt 2
How do I POST a JSON body to an API endpoint using Fuel in an Android app with coroutines?
Prompt 3
How do I add a custom request interceptor to Fuel to attach an auth token to every outgoing request?
Prompt 4
Show me how to add the Fuel library to an Android project using Gradle and make my first HTTP request.
Open on GitHub → Explain another repo

← kittinunf on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.