I have a network call that in charles shows as a 3...
# chucker
c
I have a network call that in charles shows as a 304. With chucker it shows as a 200. Any way around that so it's clear to see when i encounter a 304?
p
Did you apply Chucker as an interceptor or as a network interceptor in your project? Is it possible that the 304 (“not modified”) returns through OkHttp as a cached success at the interceptor level and the network interceptor sees a more detailed picture?
c
oooh. good call. that indeed was the solution.
@gammax as seen above... the docs state to just add as an interceptor. should we update the docs, because it seems like most folks would want chucker to behave like charles?
Actually. Weirdly I get an error and a 304 on a cache hit now when I make that change. While charles shows no issue. Weird.
This is the error its reporting btw. Let me know if anyone knows how to debug. seems very weird that its saying theres an IO exception.
well that was fun solution found in #squarelibraries https://kotlinlang.slack.com/archives/C5HT9AL7Q/p1706815707993989
g
We do gave that mentioned in the docs no?
c
it is sorta mentioned as an answer to the faq question
Copy code
- Why are my encoded request/response bodies not appearing as plain text?
Please refer to this section of the OkHttp documentation. You can choose to use Chucker as either an application or network interceptor, depending on your requirements.
but whenever i add chucker, i just go to the code snippet in the readme and it only mentions interceptor instead of network interceptor.
maybe it makes more sense to have a network inspection library (like chucker) to recommend because set at the network level?
https://github.com/ChuckerTeam/chucker/pull/1172 consider updating readme i guess? 🤷 maybe not worth it. just trying to be helpful to others that aren't intimately familiar with network vs app interceptors