Main Content
replaceFields
Class: matlab.net.http.Message
Namespace: matlab.net.http
Change values in or add fields to message header
Syntax
Description
msg = replaceFields(
replaces
fields with the specified names to the indicated values specified in
msg
,FieldName1,FieldValue1,...,FieldNameN,FieldValueN
)FieldName1,FieldValue1,...,FieldNameN,FieldValueN
and
returns the updated message.
This method is the same as the changeFields
method, but if a
field does not exist which matches the name or class, then the method adds a new one
to the end of the header instead of throwing an error.
Input Arguments
Version History
Introduced in R2016b