Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan 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.

Construction

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'.

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')

Methods

convert

Return Value of AcceptField as vector of MediaType objects

Attributes

Sealedtrue

Introduced in R2016b

Was this topic helpful?