Guest User

Untitled

a guest
Jun 25th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Selenium 2: Detect content type of link destinations
  2. HttpClient httpclient = new DefaultHttpClient();
  3. HttpHead httphead = new HttpHead("http://foo/bar");
  4. HttpResponse response = httpclient.execute(httphead);
  5. BasicHeader contenttypeheader = response.getFirstHeader("Content-Type");
  6.  
  7. System.out.println(contenttypeheader);
Advertisement
Add Comment
Please, Sign In to add comment