Main Content

expectedContentLength

Class: matlab.net.http.io.GenericProvider
Namespace: matlab.net.http.io

Content length of GenericProvider

Syntax

length = expectedContentLength(provider,force)

Description

length = expectedContentLength(provider,force) returns the value of the contentLength argument provided to the constructor. If none was provided, then expectedContentLength returns [], which results in chunked transfer coding if the message has no Content-Length field. This method is an overridden method of expectedContentLength.

Input Arguments

expand all

Content provider, specified as a matlab.net.http.io.GenericProvider object.

Indicate whether to return the length of the data, specified as true or false. For more information, see the force argument in ContentProvider.expectedContentLength.

Output Arguments

expand all

Expected content length, returned as bytes. If you do not override this method, then expectedContentLength returns []. For more information, see the length argument in ContentProvider.expectedContentLength.

Attributes

Accessprotected

Version History

Introduced in R2018a