Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ServiceCaller {
- private static final String BASE_URL = "https://example.com/";
- public static void startLicense(RequestLicense requestLicense, Callback<ResponseFromService> callback) {
- Gson gson = new GsonBuilder()
- .setLenient()
- .create();
- Retrofit retrofit = new Retrofit.Builder()
- .baseUrl(BASE_URL)
- .addConverterFactory(GsonConverterFactory.create(gson))
- .build();
- WebServiceAPI wsAPI = retrofit.create(WebServiceAPI.class);
- Call<ResponseFromService> call = wsAPI.sendDataForLicense(requestLicense);
- call.enqueue(callback);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement