chucker icon indicating copy to clipboard operation
chucker copied to clipboard

Don't show Content-Encoding

Open Goooler opened this issue 5 years ago • 8 comments

:writing_hand: Describe the bug

Don't show Content-Encoding in this case.

:bomb: Steps to reproduce

  1. Add my HeaderInterceptor
  2. Add ChuckerInterceptor.Builder(context).build()
  3. Did not show Content-Encoding in Chucker, but showed in Charles

:camera: Screenshots

图片说明 图片说明 图片说明

:iphone: Tech info

  • Device: OnePlus 8t
  • OS: 11
  • Chucker version: 3.4.0

:page_facing_up: Additional context

Goooler avatar Apr 13 '21 10:04 Goooler

How do you add ChuckerInterceptor to OkHttp? As a network or application interceptor? If as an application interceptor then this is expected.

MiSikora avatar Apr 14 '21 15:04 MiSikora

How do you add ChuckerInterceptor to OkHttp? As a network or application interceptor? If as an application interceptor then this is expected.

Why designed for this ?

image

Goooler avatar Apr 14 '21 15:04 Goooler

Because this is how OkHttp works. If you want to inspect network traffic apply ChuckerInterceptor as a network interceptor.

One thing we could do, because I see a lot of confusion about this, is to display both network and application headers if it is applied as an application interceptor. But this is a topic for a different discussion. I wonder what other maintainers think of such an addition.

MiSikora avatar Apr 14 '21 16:04 MiSikora

@MiSikora Thx, I got it.

Goooler avatar Apr 14 '21 16:04 Goooler

I don't think we need to show both types of headers. I would just update README to explain the topic better.

vbuberen avatar Apr 21 '21 10:04 vbuberen

One thing we could do, because I see a lot of confusion about this, is to display both network and application headers if it is applied as an application interceptor. But this is a topic for a different discussion. I wonder what other maintainers think of such an addition.

To be honest I'm a bit unsure on this point. On one hand, I think that showing all the Headers we can provide to the user will reduce frictions (i.e. probably a user just want to see the HTTP headers without having to know at which stage of the chain a header was added). At the same time, I'm afraid this could create more confusion for users that are actually aware of the network/application interceptors differences 🤔

cortinico avatar Apr 24 '21 08:04 cortinico

I meant to show it in two sections. Network section and application section. Personally, I wouldn't bother, but I see that it comes up once in a while like in this issue so I just threw an idea.

MiSikora avatar Apr 24 '21 10:04 MiSikora

I meant to show it in two sections. Network section and application section.

+1 on having them separated

cortinico avatar Apr 24 '21 11:04 cortinico