public static class RatpackRetrofit.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
<T> T |
build(Class<T> service)
Uses this builder to create a Retrofit client implementation.
|
RatpackRetrofit.Builder |
configure(Action<? super Retrofit.Builder> builderAction)
Configure the underlying
Retrofit.Builder instance. |
Retrofit |
retrofit()
Creates the underlying
Retrofit instance and configures it to interface with HttpClient and Promise. |
public RatpackRetrofit.Builder configure(Action<? super Retrofit.Builder> builderAction)
Retrofit.Builder instance.
This is used to customize the behavior of Retrofit.
builderAction - the actions to apply to the Retrofit builderConverter.Factory,
CallAdapter.Factorypublic Retrofit retrofit()
Retrofit instance and configures it to interface with HttpClient and Promise.
The resulting Retrofit instance can be re-used to generate multiple client interfaces which share the same base URI.
public <T> T build(Class<T> service)
This is the short form of calling client.retrofit().build(service).
T - the type of the client interface.service - the client interface to generate.