Can I intercept a network requests made by my libr...
# android
n
Can I intercept a network requests made by my library in an app level (without adding any code to android library) ? I’m not using okhttp and don’t want to use it.
t
Do you know which domains you are looking for requests to?
You can set up something like charles/proxyman to sniff the traffic, but this will require a change to your manifest and installing a certificate on the device.
n
I’m already using charles/mitmproxy. I’m asking if I can intercept network on device ?
z
How are you making requests on the device? E.g. with
HttpURLConnection
directly, some other client library?
n
not with any client library. with HttpURLConnection. Consider, I don’t want to include any line of code in my library to intercept a network request made through library. Is there anything to achieve this in the app which implements this library as module dependency?
z
I don’t think that
HttpURLConnection
provides that sort of functionality itself, i don’t see anything that looks relevant in the javadoc.
n
Hmm. Is there any other way around ?