%% Find Value in HTTP HeaderField Array
% This example shows how to locate a specific header field Cache-Control in a response from mathworks.com.
% Send a message to mathworks.com.

request = matlab.net.http.RequestMessage;
uri = matlab.net.URI('https://www.mathworks.com');
response = send(request,uri);

%
% Search for Cache-Control and display the value.

field = response.getFields('Cache-Control');
value = field.Value

% Copyright 2018 The MathWorks, Inc.