%% Remove Header Field from Request Message
% Create a request message with two header fields, Cache-Control and Content-Type, and display the message.

import matlab.net.http.HeaderField

m = matlab.net.http.RequestMessage('get');
f1 = HeaderField('Cache-Control','no-store, no-cache');
f2 = HeaderField('Content-Type','text/html;charset=utf-8');
m = addFields(m,f1,f2);
show(m)

%
% Remove the Cache-Control field and display the updated message.

msg = removeFields(m,'Cache-Control');
show(msg)

% Copyright 2012 The MathWorks, Inc.