This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.net.http.HeaderField.displaySubclasses

Class: matlab.net.http.HeaderField
Package: matlab.net.http

Display supported HeaderField subclasses

Syntax

matlab.net.http.HeaderField.displaySubclasses
[fields,names] = matlab.net.http.HeaderField.displaySubclasses

Description

example

matlab.net.http.HeaderField.displaySubclasses displays all subclasses of the HeaderField class in the matlab.net.http.field package and the names of the header fields they support. Use these subclasses to construct common header fields.

example

[fields,names] = matlab.net.http.HeaderField.displaySubclasses returns the subclass names in fields as an array of strings. The method returns the header field names that the subclasses support in names, a cell array of string vectors that the subclasses support. names{i} contains the names supported by fields(i). If fields(i) has no constraints on supported names, then names{i} is empty.

Attributes

Sealedtrue
Statictrue

Examples

expand all

Display all header field names from classes in the matlab.net.http.field package. Use this command when you chose a name for an IntegerField or URIReferenceField header field object. The Name property for these objects cannot be one of the names in this list.

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        

Show the header fields that you can create using the HTTPDateField class.

[fields,names] = matlab.net.http.HeaderField.displaySubclasses;
for i = 1:numel(fields)
    if (strcmp(fields(i),'HTTPDateField'))
        disp(names{i})
        break
    end
end
  Columns 1 through 4

    "Date"    "Expires"    "Retry-After"    "Accept-Datetime"

  Columns 5 through 6

    "Last-Modified"    "If-Modified-Since"

See Also

Introduced in R2016b