1

I am writing a basic http proxy using the com.sun.net library that uses HTTP Server and right now my proxy is able to receive the information from the client, but once I have it, how do I pass it on to a different URL (the server) that I specify? I hard coded the client to only connect to my proxys IP so I need to create a new request that uses the same headers and body to pass on to the server.

All I have access to in my handle method is a

HttpExchange t

so that is what I have to use to make the new request.

0 Answers0