4
Trang bị thêm và NHẬN sử dụng các thông số
Tôi đang cố gắng gửi yêu cầu tới API Google GeoCode bằng Retrofit. Giao diện dịch vụ trông như thế này: public interface FooService { @GET("/maps/api/geocode/json?address={zipcode}&sensor=false") void getPositionByZip(@Path("zipcode") int zipcode, Callback<String> cb); } Khi tôi gọi dịch vụ: OkHttpClient okHttpClient = new OkHttpClient(); RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint(Constants.GOOGLE_GEOCODE_URL).setClient(new OkClient(okHttpClient)).build(); FooService …