I am trying to get the web status for a given page. However when its a 404 error, the page does not return the status code, rather it throws and error.
int status= webClient.getPage("website").getWebResponse().getStatusCode();
System.out.println( status);
Any Ideas?
I am looking to see when sites time out, however for testing purposes I malformed the url of the desired website to see if I can even see a 404.