GenericField to support parameterized syntax
GenericParameterizedField object is a version of a
GenericField object that supports the following parameterized syntax.
Type; param1=value1; param2=value2; param3=value3; ...
Type is a token and each
param=value pair represents
the name and value of a parameter.
Type is optional, though subclasses can
require it. Unlike
GenericField, this field only supports a single set of
parameters (collectively called an "element"), not a comma-separated list of elements.
obj = GenericParameterizedField(name,value) creates an HTTP header
field with the Name property
name and the Value
property set to
value is a string or
character vector, then
value is used as is. Otherwise, MATLAB® attempts to convert it to a string.
value should contain a type and semicolon-separated list of
parameters in the following form, where
type is the value of the
Type property and each
param=value defines a
parameter. However, MATLAB does not enforce this syntax of
type; param1=value1; param2=value2; param3=value3; ...
value is an Nx2 string matrix, each row of the matrix represents
param=value parameter of the field, in the form:
"" type param1 value1 param2 value2
Any row with an empty name appears in the field as a value without a name. Normally
the first row is the
Type. When using this form of the constructor,
MATLAB checks that the param names and the type are legal tokens. For
param=value pairs, MATLAB quotes values that contain reserved characters, if they are not already
quoted, and escapes double-quotes.
The type is optional. If not set, then it can be set later using the
Type property or by calling the method
obj = GenericParameterizedField(name,type,Name,Value) creates a
header field with the Type property
type and parameters with additional options specified by one or
Name,Value pair arguments.
This syntax is roughly the same as specifying the following string matrix argument:
obj = GenericParameterizedField(NAME, ["" TYPE; PARAM1 VALUE1; PARAM2 VALUE2; ...])
Type— Field Type property
Field Type property specified as a string. The value is equal to any token in the
field's value that is not part of a name=value pair. If there is more than one, then
Type is a string array containing all such tokens. There is
normally one token at the start of the value that is considered the type of the
For example, in the following statement, the
Type property is
MYTYPE; foo=bar; abc=def; hij=klm
In the following statement, there is no Type, so the
foo=bar; abc=def; hij=klm
To remove all tokens, set
Type to an empty array or an empty
Name— Field name
Field name specified as a string or character vector. This property is inherited
Value— Field value
Field value specified as a string or any type valid for the
Name property. This property is inherited from superclass
|Return value of parameter in field|
|Set value of parameter in field|
|Remove parameter from field|
|Add fields to HeaderField array|
|Remove fields from header field array|
|Change existing values in HeaderField array|
|Change values in or add fields to array of HeaderFields|
|Return header fields matching name or class|
|Compare two HeaderField arrays|
|Convert header field value like another header field|
|Parse header field value and return as strings|
|Display supported HeaderField subclasses|
These methods specialize standard MATLAB operators and functions for objects in this class.
Array of header fields as string, as it appears in a message. Inserts newline characters between fields but not at the end of all fields.
Array of header fields as character vector, as described by