Share via


NSUrlSessionHandler.MaxInputInMemory Property

Definition

The maximum amount of content to load into memory when sending content with a request.

public long MaxInputInMemory { get; set; }
member this.MaxInputInMemory : int64 with get, set

Property Value

The maximum size of content to load into memory.

Remarks

When sending content with a request, the content can be provided either in memory, or in a streaming manner.

If the content is provided in memory, the underlying NSURLSession will set the Content-Length header to the size of the content.

If the content is provided in a streaming manner, the underlying NSURLSession will send the content using a chunked encoding, and the Content-Length header will not be set.

This means that if a chunked encoding is not desirable, or a Content-Length header is required, then the content must be provided in memory.

On the other hand, if upload progress is needed, it's required to provide the content in a streaming manner, and this can be forced by setting this property to 0.

If the content to upload doesn't have a pre-determined length, then it will always be sent in a streaming manner.

Applies to