-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to access request and response data from the proxy server #118
Comments
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 If you're willing to compile your own toxiproxy binary, this would be the way to go about this currently. |
thanks for your interest |
Sorry to revive an old issue. I saw that the example xthexder created got added here: https://github.com/Shopify/toxiproxy/blob/main/_examples/toxics/http_toxic.go I also saw the updated doc on using the io.Reader/io.Writer stuff here: https://github.com/Shopify/toxiproxy/blob/main/CREATING_TOXICS.md#using-ioreader-and-iowriter I can't get the http_toxic example running and much having issues trying to get something working to add a header to a request rather than the response. If anyone much smarter knows how to get access to the request and can post an example, that'd be much appreciated! |
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.
The text was updated successfully, but these errors were encountered: