-
-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to access http requests in app #332
Comments
Seems like the cleaner approach to me. Also it's probably related to #91 #305 I have to say that I'm not overly excited by the idea of exposing Chucker internals outside of Chucker as this will increase our API surface. |
LiveData or flow would be much cleaner and allow for more customization by the end user. I don't think there are flows anywhere yet in Chucker, so we could start with LiveData and add flows in the future if needed. I took a look at #305 and that seems to follow the general idea, but rather than a file, it's to the parent app. Agreed on API surface. I am thinking through the best way to do this in order to expose the least amount as possible. I was thinking something like
And it would return a list of either HttpTransaction or HttpTransactionTuple Thanks @cortinico! |
Nope we don't have flow at the moment. I'd go for LiveData at the moment.
++ Looping in also @vbuberen as he did the majority of the |
As of today I am against implementing such feature in a form of exposing some Also, I believe that for now Chucker should stay the inspector on its own with its data being inside (as it is now) not the provider for some other libs/apps. Despite joining the project pretty recently compared to other core maintainers I feel that Chucker still has to find its proper architecture and approaches to be solid and extendable. Finally, I believe that this feature request is something that I meant in #329 under |
As I said, I'm also really hesitant on this side. I don't want to waste your time @djrausch so if you can submit a PR it's definitely a plus as we have some discussion material. On the other hand, we could also decide to don't expose this data at all. As a side note: Chuck used to have a |
@vbuberen I think those are all valid points. I am trying to think of a way to expose a bare minimum level of data. I agree that having to keep the API contract can be limiting, but I believe we can find ways around that. @cortinico I will work on a PR, or document the basic ideas, and share that here. Random idea I just had, what about exposing a FragmentDialog? This would solve the exposing API issue as well as the API contract as the user still wouldn't have access to the underlying API. Thanks for all the feedback guys! |
Maybe I'm biased on this, but exposing a So to me having a |
I agree that it's not general purpose, but it would solve the concerns about the API surface. And yeah, then you'd have someone like me come along and want more data from it 😆 I think the only solution here is having some sort of intermediary class that is exposed. This way the internals can change however you'd like, but convert it back to the public class. If this is something you guys would be interested in, I can begin work on that. If this is something you don't want to do, I understand, and I will just maintain a fork for us to use. |
Thanks for you suggestions, but for now it is not something that we are interested in. Who knows, maybe we will change our minds soon, but we will definitely ping you. Also, feel free to suggest other stuff or share what you were able to achieve in your fork. It might be that we are just missing the opportunity and the beauty of things which could be done for this feature request 😉 |
Sounds good! Thanks! |
I am developing an Android TV app and use Chucker to view requests. Because TV doesn't have split screen, we have to fully switch activities for view the list.
💡 Describe the solution you'd like
There are a few possible solutions for this:
TransactionListFragment
for use in appHttpTransactionTuple
from RepositoryProvider📄 Additional context
A key use case for us would be on our video player fragments. We use ExoPlayer with OkHttp (same instance used for rest of app). We sometimes need to verify headers, params, etc for playback. Currently, we have a button on the remote launch the Chucker activity, but it would be much nicer to have inline.
🙋 Do you want to develop this feature yourself?
Absolutely, wanted to get some feedback on the best way(s) to implement this
The text was updated successfully, but these errors were encountered: