Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public static int getStatusConnectionCode(String url) {
  2.  
  3. Response response = null;
  4.  
  5. try {
  6. response = Jsoup.connect(url).userAgent("Mozilla/5.0").timeout(100000).ignoreHttpErrors(true).execute();
  7. } catch (IOException ex) {
  8. System.out.println("Excepción al obtener el Status Code: " + ex.getMessage());
  9. }
  10. return response.statusCode();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement