Setting up a docker container to monitor requests and replies of another container?

I have two docker containers running on a host, say A and B. Docker A requests for a service running on some other host and this request and reply is working perfectly. What I want to do is, I want to redirect all requests origina