public class RetrofitsKt
@NotNull public static java.lang.String tryToFindLocalIp()
Best attempt to guess local ip.
@NotNull
public static retrofit2.Retrofit.Builder retrofitBuilderWithTimeoutAndLogger(long ms,
@NotNull
mu.KLogger logger,
@NotNull
Level level,
@NotNull
java.util.List<? extends okhttp3.Interceptor> interceptors,
boolean requestGZipEncoding,
boolean circuitBreaker,
@Nullable
java.net.Proxy proxy)
Init a Retrofit.Builder with specified timeout, logger and interceptors.
requestGZipEncoding - Gzip the request for servers that support it.circuitBreaker - Add a circuit breaker facility.@NotNull
public static okhttp3.Interceptor basicAuthInterceptor(@NotNull
java.lang.String login,
@NotNull
java.lang.String password)
Create a basic auth interceptor.
@NotNull
public static okhttp3.Interceptor tokenAuthenticationInterceptor(@NotNull
java.lang.String token)
Create a token authentication interceptor.
@NotNull
public static java.lang.String basicCredentialsHeader(@NotNull
java.lang.String login,
@NotNull
java.lang.String password)
Encode basic credential header.
@NotNull
public static retrofit2.Retrofit.Builder addJacksonConverter(@NotNull
retrofit2.Retrofit.Builder $receiver,
@NotNull
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Add jackson converter factory.