title: Why does QueryParam return null
body: <p>I hava a post method where I try and add the parameter "enc":</p>
  
  <pre><code>protected void sendPost(String url, String encData) throws Exception {
  
      URL obj = new URL(url);
      HttpURLConnection con = (HttpURLConnection) obj.openConnection();
  
      //add request header
      con.setRequestMethod("POST");
      con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
  
      // Send post request
      con.setDoOutput(true);
      OutputStreamWriter wr = new OutputStreamWriter(con.getOutputStream());
      wr.write("enc="+encData);
      wr.flush();
      wr.close();
  
      int responseCode = con.getResponseCode();
      System.out.println("\nSending 'POST' request to URL : " + url);
      //System.out.println("Post parameters : " + urlParameters);
      System.out.println("Response Code : " + responseCode);
  }
  </code></pre>
  
  <p>However in my server code (below) I get a value of NULL when trying to get the data. Its just a string, not JSON or anything fancy. I've also tried writing the param as "?enc="+endData, and that does not work either. Also the path encRead is entered in the url, so I don't think that is the issue. </p>
  
  <pre><code>    @Path("/encRead")
      @POST
      public void decryptData(@QueryParam("enc") String enc) {
  
          System.out.println("got endData: "+enc);
  
      }
  </code></pre>
  
  <p>So far I've been referencing the answers from <a href="https://stackoverflow.com/questions/10357041/jersey-post-method-is-receiving-null-values-as-parameters">Jersey POST Method is receiving null values as parameters</a> but still come up with no solution</p>