chucker
chucker copied to clipboard
Add Cookie support
Is your feature request related to a problem? Please describe. Chucker should provide a way to show the Cookies that are sent for every request.
Describe the solution you'd like Ideally having a separated tab for cookies would be helpful. As a MVP having them listed below the headers would be a good starting point.
Do you want to develop this feature yourself? nop :) It's open for development
Before I drop a PR for cookies support, I'd like to get a little feedback on the UI.
The "cookies" tab is displayed if there are cookies present in either the request or the response
The "cookies" tab reuses the same UI style of headers that we have on request / response
Here's the question - the cookies are present as headers in both the request and response. I opted to leave the headers (see screenshot) even though they appear on the cookies tab, as they are valid headers. Would you prefer them to be hidden?
Cookies going in both directions
Request/response without any cookies - tab is hidden
Hey @psh Thanks for taking initiative here.
From my point of view adding a new tab with cookies will make UX worse due to creating additional confusion for users.
We have Request
and Response
tabs for all corresponding info. Putting part of request or response into a separate tab isn't something that looks good for me.
So I am for having cookies in the proper place as headers - if these are cookies for request lets put them in Request
, if these are cookies for response we should put the in Response
. This way library user will always know that all connected with request/response is 100% in the corresponding tab.
If the cookies live on their respective request and response tabs we would potentially be adding more secondary content that pushes the request body down; most of the time when I am using Chucker the body is what I care about most. It would be nice to be able to expand and collapse regions of the display to be able to see more. Personal preference, I would open the detail screen in collapsed state (at least for cookies, maybe headers also). If there are no cookies, I would hide that section of the display.
Expanded view:
and, collapsed version (showing # of cookies / headers) able to see more of the body that I care about.
(note: I havent finished filling in all the share / save / search icons in the header in my Sketch design yet)
From my point of view adding a new tab with cookies will make UX worse due to creating additional confusion for users. We have
Request
andResponse
tabs for all corresponding info. Putting part of request or response into a separate tab isn't something that looks good for me.
Agree on this point.
I like your second proposal @psh. I think we should maybe come up with a first solution that doesn't support the collapsing and add that in a subsequent PR.
Agree here that we could start without collapsing. Let's see feedback for non collapsed items first.
Also, making changes for collapsing will clash with changes planned in #337 and I would like to avoid it.
Implementing this feature after #337 would be a piece of cake - there's a lot of re-use available in the draft PR you shared. I'm happy to wait until #337 makes it into the codebase to complete the implementation.
The only concern with waiting for 337 - we might need to wait till that version of RecyclerView gets stable. I wouldn't like to have some alpha/beta versions in the library to not cause issues to library users.
We might want to release next version of the library sooner than that PR, so it would be great to have cookies
support implemented earlier to not block library development.