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.field.AcceptField class

Package: matlab.net.http.field
Superclasses: matlab.net.http.HeaderField, matlab.net.http.field.MediaRangeField

HTTP Accept header field

Description

The AcceptField is an HTTP header field in a request message. The field contains one or more media type specifications indicating the type of content acceptable to the client.

Class Attributes

Sealed

true

For information on class attributes, see Class Attributes.

Creation

obj = matlab.net.http.field.AcceptField(value) creates an Accept header field with the Value property set to value.

Use an Accept field if the server can return different MediaType objects and you want to receive only certain types. If you do not specify an Accept field, the server might assume that you are willing to receive any type.

Properties

expand all

Header field name, specified as 'Accept'.

Attributes:

GetAccess

public

SetAccess

public

Media type, specified as a vector of matlab.net.http.MediaType objects, a vector of strings, or a cell array of character vectors. All strings must be acceptable to the MediaType constructor. Each Value represents a media type containing an optional quality ('q') parameter.

Example: MediaType('application/json','q','.5')

Attributes:

GetAccess

public

SetAccess

public

Methods

expand all

Introduced in R2016b