RESTEasy (реализация JAX-RS) имеет приятную клиентскую инфраструктуру, например:
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
SimpleClient client = ProxyFactory.create(SimpleClient.class, "http://localhost:8081");
client.putBasic("hello world");
Как настроить HTTP-заголовки?
Разъяснение:
Решение, предложенное jkeeler, является хорошим подходом, но я хочу установить заголовки HTTP на уровне ProxyFactory, и я не хочу передавать заголовки на клиентский объект, Любые идеи?