Skip to content

Commit 79c3bc5

Browse files
authored
fix #2824 by forcing 'enable_content_response_on_write' on for read item
1 parent f1dad48 commit 79c3bc5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/cosmos/azure_data_cosmos/src/clients/container_client.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,11 @@ impl ContainerClient {
490490
item_id: &str,
491491
options: Option<ItemOptions<'_>>,
492492
) -> azure_core::Result<Response<T>> {
493-
let options = options.unwrap_or_default();
493+
let mut options = options.unwrap_or_default();
494+
495+
// Read APIs should always return the item, ignoring whatever the user set.
496+
options.enable_content_response_on_write = true;
497+
494498
let link = self.items_link.item(item_id);
495499
let url = self.pipeline.url(&link);
496500
let mut req = Request::new(url, Method::Get);

0 commit comments

Comments
 (0)