私はHTTPSエンドポイントを介してGETリクエストをしようとしています、私は必要とされている特別な処理があるかどうかわからないけど、以下の私のコードです:httpクライアント経由でhttps取得リクエストを実行する方法は?
String foursquareURL = "https://api.foursquare.com/v2/venues/search?ll=" + latitude + "," + longitude + "&client_id="+CLIENT_ID+"&client_secret="+CLIENT_SECRET;
System.out.println("Foursquare URL is " + foursquareURL);
try {
Log.v("HttpClient", "Preparing to create a request " + foursquareURL);
URI foursquareURI = new URI(foursquareURL);
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(new HttpGet(foursquareURI));
content = response.getEntity().getContent();
BufferedReader br = new BufferedReader(new InputStreamReader(content));
String strLine;
String result = "";
while ((strLine = br.readLine()) != null) {
result += strLine;
}
//editTextShowLocation.setText(result);
Log.v("result of the parser is", result);
} catch (Exception e) {
Log.v("Exception", e.getLocalizedMessage());
}
これは何を意味していますか? –
api.foursquare.comという例外を常に襲い、プロトコル – adit
でサポートされていないアドレスファミリにはHTTPSとは何の関係もありません(遠方のサーバ証明書は別の話であるAndroidによるaccepterです)。問題はHTTPS固有の問題ですか? HTTPSの有無にかかわらず、別のURLで試してみましたか? – Thierry