%% Display Message Payload Length
% This example shows how to read the Content-Length field in a message.

import matlab.net.*;
import matlab.net.http.*;

httpsUrl = 'https://requestserver.mathworks.com';
uri = URI(strcat(httpsUrl, '/assets/computerVision.jpg'));
req = RequestMessage('GET');
response = req.send(uri);
contentLengthField = response.getFields("Content-Length");
disp(contentLengthField)

% Copyright 2020 The MathWorks, Inc.