Answers for "Retrofit API Call"

8

add retrofit dependency android

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
Posted by: Guest on October-27-2020
0

Get Method Retrofit

public interface IService {

      String BASE_URL = "https://api.test.com/";
      String API_KEY = "SFSDF24242353434";

      @GET("Search") //i.e https://api.test.com/Search?
      Call<Products> getProducts(@Query("one") String one, @Query("two") String two,    
                                @Query("key") String key)
}
Posted by: Guest on August-02-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language