When url "https://www.parcelhero.com" is used then the code gives the http response code as 403 despite the site opening successfully and giving the actual response code as 200.Please tell me the reason.
try {
URL url = new URL("https://www.parcelhero.com");
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("GET");
connection.connect();
int code = connection.getResponseCode();
//e.printStackTrace();
System.out.println(code);
}
catch (IOException e) {
e.printStackTrace();
}