Class RatpackRetrofit.Builder

    • Method Detail

      • retrofit

        public Retrofit retrofit()
        Creates the underlying 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.

        Returns:
        the Retrofit instance to create client interfaces
      • build

        public <T> T build​(Class<T> service)
        Uses this builder to create a Retrofit client implementation.

        This is the short form of calling builder.retrofit().create(service).

        Type Parameters:
        T - the type of the client interface.
        Parameters:
        service - the client interface to generate.
        Returns:
        a generated instance of the client interface.