Open Heroes84 opened 3 years ago
It would be a hard task. Chucker uses interceptor API to inspect HTTP requests. Web sockets do not use this mechanism and the only thing you could do is to implement WebSocketListener
and try to inspect messages. Though I say try because it is very complex task (might even not be feasible to make it properly ATM). Things to consider:
ChuckerWebSocketListener
or make ChuckerInterceptor
implement required interface.BodyDecoder
interface to enable parsing of custom data by users, so we should think of support for binary–based messages.I want to see websocket messages send from server and messages send from client (application)
Is there anything in the open-source ecosystem that is already offering this capability?
Anyway, I second what @MiSikora. I believe this will add a lot of complexity and should potentially be a separate library as it covers a quite specific use case.
Would also love to see a feature like this. Was thinking an ideal situation would be that a base chucker library knows about events and can display a list+detail screen for an event, then different libraries can register new event types. Initially would only support HTTP events, but would be more straightforward to then add websocket event (has its own model + db + list view and detail screen). Other apps using other network mechanisms can then also create their own custom events and register them - for our app would be nice to be able to add FCM and XMPP information inside the chucker list.
Given the current state of the library I'm not sure this is a straightforward thing to achieve, but would be interesting to know whether this is a direction the library would take, or whether I should explore something like this independantly.
Given the current state of the library I'm not sure this is a straightforward thing to achieve, but would be interesting to know whether this is a direction the library would take, or whether I should explore something like this independantly.
I'm currently working on https://github.com/ChuckerTeam/chucker/issues/259 It will be possible to inject custom HTTP events inside Chucker in the future. I haven't thought about making it a fully multi-purpose data module, but shouldn't be that hard after we implement #259
:bulb: Describe the solution you'd like
I want to see websocket messages send from server and messages send from client (application)
:raising_hand: Do you want to develop this feature yourself?