Reactor
The reactor extension package for Fuel.
Installation
You can download and install fuel-reactor with Maven and Gradle. The reactor package has the following dependencies:
Project Reactor: 3.2.2.RELEASE
implementation 'com.github.kittinunf.fuel:fuel:<latest-version>'
implementation 'com.github.kittinunf.fuel:fuel-reactor:<latest-version>'Usage
See FuelReactor.kt
Responses
The Reactor module API provides functions starting with the prefix mono to handle instances of Response, Result<T, FuelError> and values directly (String, ByteArray, Any). All functions expose exceptions as FuelError instance.
Data handling example
Fuel.get("https://icanhazdadjoke.com")
.header(Headers.ACCEPT to "text/plain")
.monoString()
.subscribe(::println)Error handling example
Response handling example
Last updated
Was this helpful?