1 Reply Latest reply on Jul 27, 2011 8:42 PM by DrClap

    HttpURLConnection - Server returned HTTP response code: 400

      Hi friends,
      I am getting this exception "java.io.IOException: Server returned HTTP response code: 400" while getting InputStream. Whereas, hitting the same URL in IExplorer gave the successful response. Please find below the code. Please help. Thanks.

      code :

      URL hostURL = new URL("http://www.domain.com/abc?paramters=values");
      HttpURLConnection urlcon = (HttpURLConnection) hostURL.openConnection();
      //urlcon.connect(); --tried this one also...same exception
      InputStream is=urlcon.getInputStream(); -- exception occurs at this line.

      Please help me if you have any details for this error.