KeyBaseLib response Client

This commit is contained in:
Michal Kepkowski
2016-04-08 19:10:59 +02:00
parent 26bfe06d80
commit 7b97c2bbed
2 changed files with 10 additions and 10 deletions

View File

@@ -119,7 +119,7 @@ public class LinkedIdCreateTwitterStep1Fragment extends Fragment {
private static Boolean checkHandle(String handle) {
try {
HttpURLConnection nection =
(HttpURLConnection) new URL("https://twitter.com/" + handle).openConnection();
(HttpURLConnection) new URL("https://twitter.com/" + handle).getUrlResponse();
nection.setRequestMethod("HEAD");
nection.setRequestProperty("User-Agent", "OpenKeychain");
return nection.getResponseCode() == 200;