%% Add HTTP Accept Header Field
% Create an Accept header field with value 'text/plain' and add it to a default request message.

field = matlab.net.http.HeaderField('Accept','text/plain');
m = matlab.net.http.RequestMessage('get');
msg = addFields(m,field);
show(msg)

% Copyright 2012 The MathWorks, Inc.