throw new RuntimeException("Cannot substitute annotations for method " + method.getName(), e);
}
final ProxyBuilder<?> proxyBuilder = ProxyBuilder.build(parameterType, getBaseURL() + resourcePath);
final Map<String, String> headers = getHeaders(clazz, method);
if (!headers.isEmpty()) {
proxyBuilder.executor(new ApacheHttpClient4Executor() {
@Override
public ClientResponse execute(ClientRequest request) throws Exception
{
for (Map.Entry<String, String> entry : headers.entrySet()) {
request.header(entry.getKey(), entry.getValue());