I need to set the port of a HttpRequest. This is the port the Request is coming FROM.
Normal HTTP scenario:
Request: 127.0.0.1:6745 --> www.stackoverflow.com Response: 1227.0.0.1:6745 <-- www.stackoverflow.com
Request: 127.0.0.1:8096 --> www.stackoverflow.com Response: 1227.0.0.1:8096 <-- www.stackoverflow.com
My scenario:
Request: 127.0.0.1:6745 --> www.stackoverflow.com Response: 1227.0.0.1:6745 <-- www.stackoverflow.com
Request: 127.0.0.1:6745 --> www.stackoverflow.com Response: 1227.0.0.1:6745 <-- www.stackoverflow.com
The request must always come from a defined port. Is this even possible in the HTTP protocol? If yes, how do I use the WebRequest class in the .NEt framework? Or do I have to use manual sockets?