Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.net.http.field.ContentLengthField class

Package: matlab.net.http.field
Superclasses: matlab.net.http.HeaderField, matlab.net.http.field.IntegerField

HTTP Content-Length field

Description

A ContentLengthField object is an HTTP header field in a request or a response message that specifies the length of the payload in bytes.

MATLAB® requires all outbound messages with a payload to contain a Content-Length field. If a message contains a nonempty body, MATLAB creates a Content-Length field based on the length of the data. For more information, see RFC 7231, section 3.3.2. Content-Length.

Response messages might or might not contain this field.

Construction

obj = matlab.net.http.field.ContentLengthField(value) creates a Content-Length header field with the Value property set to value.

Properties

expand all

Header field name, specified as 'Content-Length'.

Length of payload in bytes, specified as a nonnegative integer or a string that evaluates to a nonnegative integer.

Methods

convert

Return Value of ContentLengthField as integer of type double

Introduced in R2016b

Was this topic helpful?