fields = addFields(fields,newFields)
adds newFields to the end of the HeaderField
array fields and returns the updated array.
addFields does not check for duplicate fields.
fields = addFields(msg,fName,fValue)
adds field with name fName and value
fValue.
fields = addFields(fields,fName1,fValue1,...,fNameN,fValueN)
adds fields specified by fName, fValue
pair arguments, in the order specified.
fields = addFields(fields,index,___)
inserts fields at index and can include any of the input
arguments in previous syntaxes.
newFields — Fields to add matlab.net.http.HeaderField
Fields to add, specified as a vector or comma-separated list of one or
more matlab.net.http.HeaderField objects.
fName — Header field name string
Header field name, specified as a string.
fValue — Header field value string | any type valid for fName
Header field value, specified as a string or any type valid for
fName. To use the default value for the field, set
fValue to ''. If the last value is
missing, then it is the same as specifying [].
index — Location in header field array integer
Location in header field array, specified as an integer. If
index is greater than the length of the header or
index is 0, the method adds fields to the end. If
index is negative, the method counts from the end of
the header.