title: getting HTTP/1.1 400 Bad Request
body: <p>This is my code. I am receiving HTTP/1.1 400 Bad Request. Not sure if I did something wrong here.</p>
  
  <pre><code>try {
                  //client = new DefaultHttpClient();
                  client=HttpClientBuilder.create().build();
                  get = new HttpGet(queryURL.toString());
                  HttpResponse response = client.execute(get);
                  if(HttpStatus.SC_OK!=response.getStatusLine().getStatusCode()) {
                      throw new ServiceException(this, response.getStatusLine().getStatusCode()+"", response.getStatusLine().toString());
                  }
                  BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
                  StringBuffer json = new StringBuffer();
                  String line = "";
                  while ((line = rd.readLine()) != null) {
                      json.append(line);
                  }
  </code></pre>
  
  <p>The error message.</p>
  
  <p>ServiceException: HTTP/1.1 400 Bad Request</p>