Share via


CosmosClientBuilder.WithContentResponseOnWrite(Boolean) Method

Definition

Gets or sets the boolean to only return the headers and status code in the Cosmos DB response for write item operation like Create, Upsert, Patch and Replace. Setting the option to false will cause the response to have a null resource. This reduces networking and CPU load by not sending the resource back over the network and serializing it on the client.

public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithContentResponseOnWrite (bool contentResponseOnWrite);
member this.WithContentResponseOnWrite : bool -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder
Public Function WithContentResponseOnWrite (contentResponseOnWrite As Boolean) As CosmosClientBuilder

Parameters

contentResponseOnWrite
Boolean

a boolean indicating whether payload will be included in the response or not.

Returns

The CosmosClientBuilder object

Remarks

This option can be overriden by similar property in ItemRequestOptions and TransactionalBatchItemRequestOptions

Applies to

See also