title: Listening for an HTTP Request
body: <p>I have an assignment where I need to create a Proxy server, that will manipulate some of the requests/responses it gets, implement caching, etc.</p>
  
  <p>For starters, I want to create the simplest proxy, that simply passes on all requests and responses. I've done some searches online and I am a bit confused on how to listen to requests in a certain port and get the HTTP requests. I've stumbled on the classes <code>Socket</code>, <code>ServerSocket</code>, <code>HttpURLConnection</code>, but I'm not sure how all these interact. I tried to read the docs, but they are all intertwined and a bit hard to understand.</p>
  
  <p>Can you point me in the right direction regarding which classes I should probably use for this assignment, and maybe share a snippet for listening on a port, getting HTTP request headers, etc.?</p>