Questions regarding the usage of the Fuel networking library for Kotlin/Android.
Questions tagged [fuel]
32 questions
8
votes
3 answers
How can I fix Unresolved reference: Gson?
I'm trying to follow a tutorial about Android application. I'm using an dependency Fuel (which has a dependency to com.google.Gson deserializer). But Gson() is not imported by IDE.
I've tried to specify lower version of gson. I've re-synchronized…

alpyapple
- 183
- 2
- 6
7
votes
2 answers
Google foo bar challenge Level 3 - Doomsday-fuel
This question may be asked many times, but still, not all answers could be resolved. Since I have only less than 20 hours left so I hope someone can give me some advises. Really appreciate your help.
Currently, I have only one test case fail left to…

Benjamin Tong
- 113
- 1
- 1
- 5
2
votes
2 answers
Execution failed for task... void kotlin.jvm.internal.MutablePropertyReference1Impl.(java.lang.Class, java.lang.String, java.lang.String, int)
I'm trying to build a Gradle plugin for packing helm charts. After packaging I want to upload the chart using fuel. However as soon as I execute Fuel.upload(url) I hit the following exception.
FAILURE: Build failed with an exception.
* What went…

user672009
- 4,379
- 8
- 44
- 77
2
votes
0 answers
Kotlin Fuel Increase buffer size
I'm using fuel to make some http requests for large blobs of JSON. In this particular case I know I'm always going to receive 100s of kilobytes of JSON and never anything smaller. I've noticed the buffersize on the input stream from responses is…

John
- 65
- 5
2
votes
1 answer
Kotlin unable to pass get request parameters (Fuel library)
For this simple example taken straight from the docs:
Fuel.get("https://httpbin.org/get", listOf("foo" to "foo", "bar" to "bar"))
.also { println(it.url) }
This prints out https://httpbin.org/get, as opposed to…

nz_21
- 6,140
- 7
- 34
- 80
1
vote
1 answer
Unable to connect to API on local xampp server from android app (via emulator)
I have a simple API written in PHP to interact with my MYSQL database. The API returns the correct response when I call it from the browser in the emulator but the request fails when its being done from the code.
package…

Ruab Haque
- 13
- 2
1
vote
1 answer
Unresolved reference: github, when trying to import Fuel library in Kotlin
I am new to Kotlin so apologies if I am missing something simple here.
I am trying to import the Fuel libraries into my project, I have added the below into my Gradle which appears to sync fine
implementation…

DanB
- 23
- 4
1
vote
0 answers
Kotlin/Fuel - Unresolved reference: responseString when using apply
I would like to make creation of FuelManager instance flexible by using apply with it. So, for example, the properties that are common for all instances would be created with this function:
fun createFuelManagerInstance(ctx: Ctx, url: String) =…

Leff
- 1,968
- 24
- 97
- 201
1
vote
1 answer
Kotlin Fuel blocking mode GET http request always fails
Until now, I've been using Fuel's async GET http requests and everything works fine.
I now need to send the request in a blocking mode since I need the result before the app continues
to run.
Here is a very simple GET http request in blocking mode…

Pleurk
- 58
- 4
1
vote
1 answer
Test case crashing when using Fuel framework android
The test case is crashing when using fuel framework
java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. See http://g.co/androidstudio/not-mocked for details.
at android.os.Looper.getMainLooper(Looper.java)
at…

Ismail Shaikh
- 482
- 4
- 13
1
vote
1 answer
Ignore some nested items in Gson Deserializing
I want to deserialize NASA asteroids that I get from an API call in json format like this:
data class Asteroid(
val id: Int,
val name: String = "",
val meanDiameter: Int,
)
class Deserializer : ResponseDeserializable {
…

Johannes Pertl
- 833
- 8
- 23
1
vote
1 answer
Can't mock com.github.kittinunf.fuel.Fuel with mockk
I need your help in the following problem: I can not get mocked the Fuel.get call.
What I've tried:
This is the service class, where Fuel will be called.
class JiraService {
private val logger: Logger =…

Tatiana Krasikova
- 21
- 3
1
vote
1 answer
How to make Kotlin Fuel json serializer to compile?
I'm trying to use Fuel JSON deserializer so I added it to my dependencies like this:
implementation 'com.github.kittinunf.fuel:fuel:2.2.1'
implementation 'com.github.kittinunf.fuel:fuel-json:2.2.1'
However each time I'm running ./gradlew clean…

rvazquezglez
- 2,284
- 28
- 40
1
vote
0 answers
How to build a proxy for HTTP requests with Fuel
I was using restTemplate and this was my method:
fun fetchAvailableCars(): Aggregations? {
val availableCarsUrl = UriComponentsBuilder
.fromHttpUrl(getCatalogUrl())
.query("aggsBy={aggregators}")
…

bpereira
- 966
- 2
- 11
- 29
1
vote
1 answer
Setting cookie properly in fuel requests
I'm trying to set cookie to all get or post request after successful authentication. The authentication request returns response with Set-cookie header value of format
[accesstoken=sample_token; Version=1; Comment=secured; Domain=test.com;…

The_ehT
- 1,202
- 17
- 32