HttpClient.MaxResponseContentBufferSize Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum number of bytes to buffer when reading the response content.
public:
property long MaxResponseContentBufferSize { long get(); void set(long value); };
public long MaxResponseContentBufferSize { get; set; }
member this.MaxResponseContentBufferSize : int64 with get, set
Public Property MaxResponseContentBufferSize As Long
Property Value
The maximum number of bytes to buffer when reading the response content. The default value for this property is 2 gigabytes.
Exceptions
The size specified is less than or equal to zero.
An operation has already been started on the current instance.
The current instance has been disposed.
Remarks
An app can set the MaxResponseContentBufferSize property to a lower value to limit the size of the response to buffer when reading the response. If the size of the response content is greater than the MaxResponseContentBufferSize property, an exception is thrown.