4 ms·
I've always used a proxy, like charles proxy, for this exact purpose. A neutral middle-man that gives exact timing/response data.
by zug_zug 2y ago
I've always used a proxy, like charles proxy, for this exact purpose.
A neutral middle-man that gives exact timing/response data.
- actionfromafar 2y agoThat’s fine if you can, but say you want to trace deployed on stage, or shudders even production. Or you code tests against some CI and can only add Python.
- zug_zug 2y agoWell I would never use a script like this at a real job outside of local testing. What you'd want on stage is probably using opentelemetry, which I believe has auto-instrumentation for all network calls. Then you have the data forever and it's in a public, shared platform that is permissioned and everybody knows, and will still exist in 10 years.
- cjbprime 2y agoI'm really surprised this was downvoted. Running e.g. mitmproxy and pointing your Python process at it is absolutely the way to do this.
- sureglymop 2y agoThis is how I do it. But I use it for everything I even want to proxy yo inspect the traffic really.
- nghiatran_uit 2y agoIt's not as simple as it sounds, it requires a lot of code to capture Python traffic with charles-proxy. For example, you might modify your python code to use a Proxy and accept a self-signed Charles's certificate. If you need a 1-click solution, no dependencies, and no code's required, check out Proxyman with Auto-Setup: https://docs.proxyman.io/automatic-setup/automatic-setup https://docs.proxyman.io/automatic-setup/automatic-setup Works with all popular Python libs: request, aiohttp, http.client, urllib3, etc * Disclaimer: I'm Noah, creator of Proxyman. I know a pain point when using Charles, and decided to build a new one, to make life easier. Hope it helps you.
- antman 2y agoIs that only iOS?
- nghiatran_uit 2y agoBoth, native macOS and iOS