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.

convert

Class: matlab.net.http.field.SetCookieField
Package: matlab.net.http.field

Returns CookieInfo object for each Set-Cookie field

Syntax

value = convert(fields)
value = convert(fields,uri)

Description

value = convert(fields) returns a CookieInfo object for each Set-Cookie field. A SetCookieField contains information about one cookie. If the server sends multiple cookies, then there are multiple SetCookieField objects.

value = convert(fields,uri) compares uri against or initializes the CookieInfo.Domain property.

Input Arguments

expand all

Set-Cookie header field, specified as a matlab.net.http.field.SetCookieField object.

URI, specified as a matlab.net.URI object. The URI is that of the request, used to compare against or initialize the CookieInfo.Domain property.

If the SetCookieField does not contain a Domain attribute, then the CookieInfo.Domain property is set to the URI.Host property.

If there is a Domain attribute, its value must domain-match the URI.Host or no CookieInfo is returned for that SetCookieField. If it matches, then the Domain property is set to the Domain attribute. For information on domain matching, see RFC 6265 section 5.1.3 and section 5.3, step 6.

If you do not specify a URI, then the CookieInfo.Domain property is not set or checked. Use this syntax if you do not intend to use the Domain attribute to manage your cookie store.

Output Arguments

expand all

CookieInfo object, returned as a vector of matlab.net.http.CookieInfo objects corresponding to the Set-Cookie fields in the fields vector.

Introduced in R2016b