Map<String, String> header = new HashMap<>();
header.put("Accept", "application/json");
HttpRequest req = new HttpRequest(RequestMethod.GET, "http://where.yahooapis.com/geocode", para, null, header);
HttpResponse resp = client.request(req);
requestCounter++;
return resp.asJSONObject().getJSONObject("ResultSet");
}
public boolean isOk(JSONObject obj) throws JSONException {
return obj.getInt("Error") == 0;
}