Hey again. I have another issue: `HttpLoggingInter...
# apollo-kotlin
v
Hey again. I have another issue:
HttpLoggingInterceptor
breaks the multipart request. If I don't add it, the request works. The exception is the same as here https://github.com/apollographql/apollo-kotlin/issues/2912, but I don't add 2 of them. I have my custom interceptor for authorization and logging. Any ideas?
b
Hello! With Multipart there is a risk that an interceptor (including the OkHttp one) consumes Uploads. We actually have a fix for that, but it's not yet released. I would be interested to know if using the snapshots fixes your issue. For your own logging interceptor, as long as you're not reading the body, you should be good (you can also have a look at our implementation for inspiration if you do need to read it)
v
Should it be like
com.apollographql.apollo3:apollo-runtime:3.3.0-SNAPSHOT
?
b
3.3.1-SNAPSHOT
(it's the latest release + 0.0.1 😅)
v
Yeah, sure) The plugin version should be updated as well?
b
yes, you need to use the same version everywhere
v
it cannot find the plugin snapshot version, but the library dependencies are fine.
Copy code
Plugin [id: 'com.apollographql.apollo3', version: '3.3.1-SNAPSHOT'] was not found in any of the following sources:
b
oh yeah sorry the instructions are not thorough. For the plugin you need to add this to your root `settings.gradle.kts`:
Copy code
pluginManagement {
    repositories {
         maven { 
    url = uri("<https://s01.oss.sonatype.org/content/repositories/snapshots/>")
  }
        gradlePluginPortal()
        mavenCentral()
    }
}
v
Is it okay that for multipart we don't have the logs now even with the interceptor?
b
you should still see the method and headers, but not the body 🤔
v
Yeah, this is what I'm talking about. It would be nice to see the sent parameters at least to verify if they're valid. The encoded string is not needed, I guess.
But it's just a suggestion
b
oh ok. Well basically, OkHttp's logging interceptor doesn't have knowledge of multipart, to it, it's only a bunch of bytes. With the fix, it simply knows to not read it, because we set a special flag "is one shot" when using it.
v
Got it. Anyway, thanks for your help. Really appreciate it)
b
my pleasure! 🙂