Simple rest client-server factory, you give it a url, it does the rest!
On the service side:
@RestService
public class MyServiceImplementation implements MyApi {
On the client side:
final MyApi client = RestClientFactory.create(MyApi.class, ()->url, ()->timeout);
Time for a coffee break!