convertLike
Class:matlab.net.http.HeaderField
Package:matlab.net.http
Convert header field value like another header field
Description
converts thevalue
= convertLike(fields
,other
)Value
property of each element offields
to a MATLAB®type, using conversion rules of the fieldother
.
For each header field infields
, MATLAB checks thematlab.net.http.field
package for a class that supports a name with the same value as thefields.Name
property. If the package contains a class for this field, thenconvert
invokes theconvert
method of that class. To see the classes in thefield
package, call thematlab.net.http.HeaderField.displaySubclasses
method.
If the conversion fails or if no class supports one of thefields.Name
properties, thenconvertLike
throws an exception.
This method does not support heterogeneous arrays. All members offields
must be the same class.