String uri,
Base base,
RequestOptions options) {
if (options == null) options = getDefaultRequestOptions();
if (base instanceof Document) {
Document d = (Document) base;
if (options.getSlug() == null &&
d.getSlug() != null)
options.setSlug(d.getSlug());
if (options.isConditionalPut()) {
if (d.getEntityTag() != null)
options.setIfMatch(d.getEntityTag());
else if (d.getLastModified() != null)
options.setIfUnmodifiedSince(d.getLastModified());
}
}
return execute("PUT", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
}