Perehvati traffic for REST API development

Hello. On duty, engaged in the development of REST APIs for various mobile applications. Sometimes you need to see what requests our application sends and how the server responds. In addition, it is sometimes necessary to replace the data in the request and check the application. Technically, I imagine it as a proxy, which is running in a local network to which to redirect all traffic to the example test Wi-Fi access point. This proxy has an address where I can go and see all requests which she caught, put the lock on which the request or make another kind of filth / grace. Do you know a similar tool? Or have to write such a tool yourself.
October 3rd 19 at 03:19
7 answers
October 3rd 19 at 03:21
The decision unfortunately under windows. And I'm guessing that the software should stand on the server and be accessible from the browser. - Wilton.Rutherford commented on October 3rd 19 at 03:24
October 3rd 19 at 03:23
In General, what you describe — task ICAP specially designed Protocol for adapting content, it is used almost all the decisions that need to check/change/filter the data passing through the proxy.

But this is, again, the General case, it is possible to just emulate the queries will be easier than to raise such infrastructure.
I was thinking in the direction of squid + icap, even libraries have found for python. But has not yet sat down and dealt with this issue so tightly. Perhaps the option of icap will be the fastest in terms of implementation. - Wilton.Rutherford commented on October 3rd 19 at 03:26
If you already have a squid, and have the opportunity to screw the adaptation as needed, not to write all at once, then you can start with a simple echo service, and time of lifting will be minimal.

But if you get up task like "be a substitute for the uncontrolled responses of the external server within an ssl connection", the option of the icap is exactly the quickest possible. - Wilton.Rutherford commented on October 3rd 19 at 03:29
October 3rd 19 at 03:25
Um... why not just add in the rest API system for logging requests/responses? Substitution of the data in the queries? again, why not just compile your own and send using the same curl...

p.s. do the same, but somehow that's never been necessary to monitor who sends what. Why?
If there any problems with the production environment ( production API production build ), you need to see what it sends and it receives. - Wilton.Rutherford commented on October 3rd 19 at 03:28
October 3rd 19 at 03:27
You can write local (in your network) proxy for your Protocol and redirect traffic to it through the substitution of the local DNS record.
In this embodiment, all the cards are in the hands of substitution data + you can "intercept" SSL traffic (you have your certificate).
Cons — need to bother.
For this purpose, we made even a special Wi-Fi network COMPANY-TEST, while connecting to all of our production servers magically rerouted to preprod. - Wilton.Rutherford commented on October 3rd 19 at 03:30
October 3rd 19 at 03:29
October 3rd 19 at 03:31
October 3rd 19 at 03:33
I use Charles
Then, the smartphone you just need to register proxy - Wilton.Rutherford commented on October 3rd 19 at 03:36

Find more questions by tags Mobile developmentRESTful API