Class Retrofit2SyncCall<T>
java.lang.Object
com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Texecute(retrofit2.Call<T> call) Handle IOExceptions fromCall.execute method centrally, instead of all places that make retrofit2 API calls.static <T> retrofit2.Response<T>executeCall(retrofit2.Call<T> call) Handle IOExceptions fromCall.execute method centrally, instead of all places that make retrofit2 API calls.
-
Constructor Details
-
Retrofit2SyncCall
public Retrofit2SyncCall()
-
-
Method Details
-
execute
public static <T> T execute(retrofit2.Call<T> call) Handle IOExceptions fromCall.execute method centrally, instead of all places that make retrofit2 API calls.- Type Parameters:
T- Successful response body type.- Throws:
SpinnakerNetworkException- if IOException occurs.
-
executeCall
public static <T> retrofit2.Response<T> executeCall(retrofit2.Call<T> call) Handle IOExceptions fromCall.execute method centrally, instead of all places that make retrofit2 API calls.- Parameters:
call- call to be executed- Returns:
- Response
response after execution - Throws:
SpinnakerNetworkException- if IOException occurs.
-