pluto icon indicating copy to clipboard operation
pluto copied to clipboard

Does pluto able to intercept HTTP Request e.g other than Okhttp?

Open mochadwi opened this issue 3 years ago • 5 comments

e.g: HttpConnection, FastNetworking, Ktor, etc

mochadwi avatar Aug 01 '21 19:08 mochadwi

hey @mochadwi, for now, Pluto intercepts only Okhttp requests.

if you have any specific usecase, do share with us, we will try to include it in our future releases.

mocklets-tech avatar Aug 02 '21 04:08 mocklets-tech

We can add an optional support for logging HttpURLConnection through URLStreamHandlerFactory, URLStreamHandler, URL.setURLStreamHandlerFactory()

Maybe some level of logging can be achieved through this.

See this answer: https://stackoverflow.com/a/26409796/2960297

amankgo avatar Aug 09 '21 07:08 amankgo

The PlutoInterceptor works great but additionally it would be nice to have access to NetworkCallsRepo, so that anyone can write a custom interceptor for any http client. We would like to use this to write our own interceptors for gPRC clients based on io.grpc.ManagedChannel. In my opinion this should not be difficult to achieve, only ResponseData.Protocol needs to be changed to not depend on okhttp3.protocol.

mlilienberg avatar Oct 05 '21 07:10 mlilienberg

Stale issue

github-actions[bot] avatar Jan 01 '22 00:01 github-actions[bot]

@mlilienberg nice feature suggestion. will look into this

srtvprateek avatar Jan 03 '22 08:01 srtvprateek