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.SetCookieField class

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

HTTP Set-Cookie header field

Description

A SetCookieField object appears in a response message created by the server. A message can have one or more Set-Cookie fields. To extract the Value property as a CookieInfo object, call the convert method.

Properties

expand all

Header field name, specified as 'Set-Cookie'.

Header field value, specified as a string.

Methods

convertReturns CookieInfo object for each Set-Cookie field

Attributes

Sealedtrue

Examples

expand all

uri = matlab.net.URI('http://www.mathworks.com');
opts = matlab.net.http.HTTPOptions('MaxRedirects',1);
resp = matlab.net.http.RequestMessage().send(uri,opts);
setCookieFields = resp.getFields('Set-Cookie');
if ~isempty(setCookieFields)
   cookieInfos = setCookieFields.convert(uri);
end

Introduced in R2016b

Was this topic helpful?