Я пытаюсь сделать запрос GET через конечную точку 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());
}