I don't think you can do that.
typically what happens is Server A sends back a 302 'Moved' (to server B location) http status code, and the requestor resends the request to the provided location.
many times this happens in the HTTP stack and the client app code doesn't even know.
your problem is server B believes (correctly) that Server A is the client.