Colton Idle
05/20/2021, 4:43 AMDate
header of a response, would that be visible in Charles proxy? No right? Like the interceptor and response modification happens once it crosses back over the network and back onto the device? I'm just trying to make sure that my interceptor is working as intended. 😅jw
05/20/2021, 4:44 AMjw
05/20/2021, 4:44 AMjw
05/20/2021, 5:05 AMColton Idle
05/20/2021, 5:10 AMColton Idle
05/24/2021, 2:25 AMexhaustive
to my android app. I apparently suck at gradle.
Docs say to add
buildscript {
dependencies {
classpath 'app.cash.exhaustive:exhaustive-gradle:0.1.1'
}
repositories {
mavenCentral()
}
}
and so I added that classpath line to my root build.gradle. Then I went into my app module and added this
apply plugin: 'org.jetbrains.kotlin.jvm' <--- I also tried .android
apply plugin: 'app.cash.exhaustive'
but now I get an error regarding hilt. Am I missing someting? Should the plugin apply statements instead be in my root?myanmarking
05/24/2021, 3:01 PM.addConverterFactory(MoshiConverterFactory.create(moshi))
.addConverterFactory(Json.asConverterFactory(contentType))
jw
05/24/2021, 3:01 PMmyanmarking
05/24/2021, 3:02 PMmyanmarking
05/24/2021, 3:02 PMmyanmarking
05/24/2021, 3:02 PMmyanmarking
05/24/2021, 3:02 PMAlfred Lopez
05/24/2021, 4:41 PMColton Idle
05/25/2021, 1:46 AM/api/one
but it doesn't get called because what's defined in retrofit is /api/one?version=1
Is there a way to implement wildcard routes?jw
05/25/2021, 2:25 AMjw
05/25/2021, 2:27 AMrequest.requestUrl.path
Colton Idle
05/25/2021, 2:29 AMjw
05/25/2021, 2:33 AMpath
should not have the ?...
part, those are the query parametersColton Idle
05/25/2021, 2:35 AMjw
05/25/2021, 2:42 AMencodedPath
?Colton Idle
05/25/2021, 3:37 AM`request.requestUrl!!.encodedPath()`
did the trick! edit: can't unformat that with slack for some reason.Colton Idle
05/26/2021, 8:35 PM@Suppress("unused") // Receiver reference forces when into expression form.
inline val Any?.exhaustive get() = Unit
but a Con listed is "Requires a library". Just trying to make sure something is not going over my head. "Requires a library" means that I need to add these two lines of code myself (or a library that adds this ext function) right? Or is it saying that you actually need to use some library to use this method?alex.tavella
05/28/2021, 12:37 AM[Turbine]
Any idea why this test fails?
@Test
fun testBatchEmission() = runBlocking {
flow {
val result = mutableListOf<Int>()
for (i in 1..56) {
result.add(i)
if (i % 10 == 0) emit(result)
}
emit(result)
}.test {
assertEquals(10, expectItem().size)
assertEquals(20, expectItem().size)
assertEquals(30, expectItem().size)
assertEquals(40, expectItem().size)
assertEquals(50, expectItem().size)
assertEquals(56, expectItem().size)
expectComplete()
}
}
jw
05/28/2021, 12:38 AMexpectItem()
does not have a chance to resume from suspensionjw
05/28/2021, 12:39 AMyield()
after each call to emit(..)
alex.tavella
05/28/2021, 12:42 AMjw
05/28/2021, 12:43 AMemit(result.toList())
which takes an immutable copy and emits itjw
05/28/2021, 12:43 AMalex.tavella
05/28/2021, 12:48 AMAbhishek Dewan
05/28/2021, 1:40 AM