Closed binSaed closed 2 years ago
But then It will work only for Dio package only, what about the other http request packages?
@Abdelazeem777
user will have 2 optional
1-add interceptor if he uses dio
2- manually use InspectorController().addNewRequest
I think interceptor will reduce code and more clear if used in large apps
@maxzod ur opinion?
why not listen for all the requests like the devtools
does ?
iam working on a queen_dev_tools
and stuck on the part of how to listen for any IO
request 😢
also the dio
interceptor would be great but it will make it depend on dio
still less code to right if you intended to use dio in your application
still fixing the root problem and listen to any IO
request will be the best solution
also it will provide more options to observe like socket
and local network requests not just the used API
@AbdOoSaed
I think it's a very good idea to have both options, so I will consider adding this feature for the next version ISA.
@maxzod
It would be great because the widget will log the http requests by itself but I kinda hard to achieve because of listening to the IO http requests, as we discussed lately.
So if you have any suggestions to do so, please don't hesitate.
Now you can pass RequestsInspectorInterceptor
to Dio
instead of using normal InspectorController.addRequest
method.
ex.
final dio = Dio()..interceptors.add(RequestsInspectorInterceptor());
instead of adding the request by your hand
u can make an interceptor for the DIO package and the user will add this one time like this