matlab.net.http.HeaderField.displaySubclasses - Display supported HeaderField subclasses - MATLAB (original) (raw)
Main Content
Class: matlab.net.http.HeaderField
Namespace: matlab.net.http
Display supported HeaderField subclasses
Syntax
Description
matlab.net.http.HeaderField.displaySubclasses
displays all subclasses of the HeaderField
class in thematlab.net.http.field
namespace and the names of the header fields they support. Use these subclasses to construct common header fields.
[`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
Examples
Display all header field names from classes in thematlab.net.http.field
namespace. Use this command when you chose a name for an IntegerField
orURIReferenceField
header field object. TheName
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
"Date" "Expires" "Retry-After" "Accept-Datetime" "Last-Modified" "If-Modified-Since"
Version History
Introduced in R2016b