return new ClientRequestImpl(this.uri, this.method,
this.entity, clone(this.metadata));
}
private static MultivaluedMap<String, Object> clone(MultivaluedMap<String, Object> md) {
MultivaluedMap<String, Object> clone = new OutBoundHeaders();
for (Map.Entry<String, List<Object>> e : md.entrySet()) {
clone.put(e.getKey(), new ArrayList<Object>(e.getValue()));
}
return clone;
}