I was playing around with the HTTP POST and GET requests in Java. I was just trying to mimic the requests that my browser sends using Java (I am using the URLConnection class). However, when I used Wireshark to analyze the packets that my browser sent and the ones that were sent through Java, I found a big difference:
https://i.stack.imgur.com/n8OvR.png
https://i.stack.imgur.com/zPBPR.png
(open links to view the images)
When I send HTTP POST/GET, the tool that I am using (either a browser or Java) sends information about itself. However, I want to send EXACTLY the same packet through Java as I would through a browser. Is there a way to do it? How can I hide the sender (in this case Java) information? Thank you!