toxiproxy
toxiproxy copied to clipboard
how to access request and response data from the proxy server
Hi, I want to manipulate and recognize errors from the requests and response data which are passing through the proxy server. What are is the proper way of doing that? It would be nice to if someone explains it step by step.
I'm assuming when you say "request and response data" you're referring to HTTP requests and responses. We currently don't have any built in HTTP aware toxics. Though there are plans to add an official one in the future, the present toxic interface makes it possible for you to build one yourself.
I spent a little time looking at http toxics in the past, and have an example up here: https://github.com/xthexder/toxic-example/blob/master/http.go It only modifies responses, but a similar approach could be used for requests.
If you're willing to compile your own toxiproxy binary, this would be the way to go about this currently.
thanks for your interest