title: How to post with java without urlencoding query part of url
body: <p>I am trying to use a signed java applet to post to a url like:</p>
  
  <p><a href="http://some.domain.com/something/script.asp?param=5041414F9015496EA699F3D2DBAB4AC2|178411|163843|557|1|1|164||attempt|1630315" rel="nofollow">http://some.domain.com/something/script.asp?param=5041414F9015496EA699F3D2DBAB4AC2|178411|163843|557|1|1|164||attempt|1630315</a></p>
  
  <p>But when java makes the connection, the java console shows:</p>
  
  <p>network: Connecting <a href="http://some.domain.com/something/script.asp?param=5041414F9015496EA699F3D2DBAB4AC2%7C178411%7C163843%7C557%7C1%7C1%7C164%7C%7Cattempt%7C1630315" rel="nofollow">http://some.domain.com/something/script.asp?param=5041414F9015496EA699F3D2DBAB4AC2%7C178411%7C163843%7C557%7C1%7C1%7C164%7C%7Cattempt%7C1630315</a> </p>
  
  <p>I do not want java to urlencode the pipes in the query from | to %7c.  It seems the service I'm connecting to doesn't urldecode the param, and I can't change the server side code.  Is there a way in java to make the post without escaping the query?</p>
  
  <p>The java I'm using is below:</p>
  
  <pre><code>try {
          URL url = new URL(myURL);
          URLConnection connection = url.openConnection();
          connection.setDoOutput(true);
  
          OutputStreamWriter out = new OutputStreamWriter(
                  connection.getOutputStream());
          out.write(toSend);
          out.close();
  
          BufferedReader in = new BufferedReader(
                  new InputStreamReader(
                          connection.getInputStream()));
  
          String decodedString = "";
  
          while ((decodedString = in.readLine()) != null) {
              totalResponse = totalResponse + decodedString;
          }
          in.close();
  
      } catch (Exception ex) {
      }
  </code></pre>
  
  <p>Thank you for any help!</p>