matlab.net.http.field.GenericParameterizedField Class
Namespace: matlab.net.http.field
Superclasses: matlab.net.http.field.GenericField
GenericField to support parameterized syntax
Description
A 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.
Creation
Description
obj = GenericParameterizedField(name,value)
creates an HTTP header
field with the Name property
set to name
and the Value
property set to value
. If 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 value
.
type; param1=value1; param2=value2; param3=value3; ...
If value
is an Nx2 string matrix, each row of the matrix represents
a 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
setParameter(obj,"",type)
.
obj = GenericParameterizedField(name,type,Name,Value)
creates a
header field with the Type property
set to type
and parameters with additional options specified by one or
more 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; ...])
Properties
Methods
Version History
Introduced in R2018a