title: Java get parameters from post request
body: <p>I am currently trying to handle some incoming POST requests in Java. </p>
  
  <p>It is working partly so far. I can receive the requests, but I can't seem to extract the parameters and values sent with the request. </p>
  
  <p>Here is my Java code for receiving the requests so far:</p>
  
  <pre><code>public HybridRemoteReceiver() {
  
  try {
      System.out.println("running...");
      ServerSocket ss = new ServerSocket(3434);
  
      int i = 0;
      while (true) {
          Socket client = ss.accept();
          BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));
          String line;
  
          while ((line = in.readLine()) != null) {
              if (line.length() == 0)
                  break;
              i++;
          }
          in.close();
          client.close();
      }
  
  
  } catch (Exception e) {
      e.printStackTrace();
  }
  
  }
  </code></pre>
  
  <p>I am aware that there is a class called <code>HttpServer</code>, but It's like this class doesn't exist in Java. </p>
  
  <p>I am using java 1.8 in eclipse btw.</p>
  
  <p>However, I can find the classes <code>HttpExchange</code> and <code>HttpHandler</code>, but can't seem to make them work.</p>
  
  <p>Basically what I want to achieve, is to receive the data sent with the post request and NOT send anything back to the client.</p>
  
  <p>I really hope anyone can help me out with this.</p>