title: java http get "request reject" but work in browser
body: <p>I am trying to consume a web service. The response is "Request Rejected.The requested URL was rejected. Please consult with your administrator.Your support ID is: 11127005317486483617"<br/> 
  This is my code:<br/>
  <br/>
  <br/></p>
  
  <pre><code>import java.io.BufferedReader;&lt;br/&gt;
  import java.io.IOException;&lt;br/&gt;
  import java.io.InputStreamReader;&lt;br/&gt;
  import java.io.StringReader;&lt;br/&gt;
  import java.net.HttpURLConnection;&lt;br/&gt;
  import java.net.MalformedURLException;&lt;br/&gt;
  import java.net.URL;&lt;br/&gt;
  
  import java.util.*;&lt;br/&gt;
  import java.io.FileNotFoundException;&lt;br/&gt;
  import java.io.FileReader;&lt;br/&gt;
  import java.io.IOException;&lt;br/&gt;
  import org.json.JSONArray;&lt;br/&gt;
  import org.json.JSONException;&lt;br/&gt;
  
  import java.util.Iterator;&lt;br/&gt;
  import org.json.JSONObject;&lt;br/&gt;
  import org.json.simple.parser.JSONParser;&lt;br/&gt;
  import org.json.simple.parser.ParseException;&lt;br/&gt;
  
  public class Testapp {&lt;br/&gt;
      public static void main(String[] args) throws JSONException, ParseException {&lt;br/&gt;
          String output = "abc";&lt;br/&gt;
          try {&lt;br/&gt;
              URL url = new URL("https://peps.cnes.fr/resto/api/collections/S1/search.json?q=france&amp;maxRecords=100&amp;startDate=2014-12-31T05:00:00&amp;completionDate=2014-12-31T12:00:00");&lt;br/&gt;
              HttpURLConnection conn = (HttpURLConnection) url.openConnection();&lt;br/&gt;
              conn.setRequestMethod("GET");&lt;br/&gt;
              conn.setRequestProperty("Accept", "application/json");&lt;br/&gt;
              if (conn.getResponseCode() != 200) {&lt;br/&gt;
                  throw new RuntimeException("Failed : HTTP error code : "&lt;br/&gt;
                      + conn.getResponseCode());&lt;br/&gt;
              }&lt;br/&gt;
              BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));&lt;br/&gt;
              //String output;&lt;br/&gt;
              System.out.println("Output from Server .... \n");&lt;br/&gt;
              while ((output = br.readLine()) != null) {&lt;br/&gt;
              System.out.println(output);&lt;br/&gt;
              }&lt;br/&gt;
              conn.disconnect();&lt;br/&gt;
        } catch (MalformedURLException e) {&lt;br/&gt;
            e.printStackTrace();&lt;br/&gt;
        } catch (IOException e) {&lt;br/&gt;
            e.printStackTrace();&lt;br/&gt;
        }&lt;br/&gt;
      }&lt;br/&gt;
  }&lt;br/&gt;
  </code></pre>
  
  <p>But,this url worked well in browser. Somebody help me?</p>