
io.github.satya64.powerbi.api.ClientUtils Maven / Gradle / Ivy
package io.github.satya64.powerbi.api;
import retrofit2.Response;
public final class ClientUtils {
public static T buildAndSendResponseBody(final Response response) throws PowerBiClientException {
if (response.isSuccessful()) return response.body();
else throw new PowerBiClientException(response);
}
public static int buildAndSendResponseCode(final Response response) throws PowerBiClientException {
if (response.isSuccessful())
return response.code();
else throw new PowerBiClientException(response);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy