Main Content

matlab.net.http.HeaderField.displaySubclasses

类: matlab.net.http.HeaderField
命名空间: matlab.net.http

显示支持的 HeaderField 子类

说明

示例

matlab.net.http.HeaderField.displaySubclasses 显示 matlab.net.http.field 命名空间中的 HeaderField 类的所有子类以及它们支持的标头字段的名称。可使用这些子类构造常见的标头字段。

示例

[fields,names] = matlab.net.http.HeaderField.displaySubclasses 以字符串数组形式返回 fields 中的子类名称。该方法在子类支持的字符串向量元胞数组 names 中返回子类支持的标头字段名称。names{i} 包含 fields(i) 支持的名称。如果 fields(i) 对支持的名称没有限制,则 names{i} 为空。

属性

Sealedtrue
Statictrue

示例

全部展开

显示 matlab.net.http.field 命名空间中的类的所有标头字段名称。当您为 IntegerFieldURIReferenceField 标头字段对象选择名称时,可以使用此命令。这些对象的 Name 属性不能是此列表中的任何名称。

matlab.net.http.HeaderField.displaySubclasses
Available classes in matlab.net.http.field and names they support:
AcceptField              Accept
AuthenticateField        WWW-Authenticate, Proxy-Authenticate
AuthenticationInfoField  Authentication-Info, Proxy-Authentication-Info
AuthorizationField       Authorization, Proxy-Authorization
ConnectionField          Connection
ContentLengthField       Content-Length
ContentLocationField     Content-Location
ContentTypeField         Content-Type
CookieField              Cookie
DateField                Date
GenericField             
HTTPDateField            Date, Expires, Retry-After, Accept-Datetime, Last-Modified, If-Modified-Since
HostField                Host
IntegerField             
LocationField            Location
SetCookieField           Set-Cookie
URIReferenceField        

显示您可以使用 HTTPDateField 类创建的标头字段。

[fields,names] = matlab.net.http.HeaderField.displaySubclasses;
for i = 1:numel(fields)
    if (strcmp(fields(i),'HTTPDateField'))
        disp(names{i})
        break
    end
end
    "Date"    "Expires"    "Retry-After"    "Accept-Datetime"    "Last-Modified"    "If-Modified-Since"

版本历史记录

在 R2016b 中推出

另请参阅