Main Content



Display or return formatted version of message body data



show(body) displays the entire Data property of a message body if Data is a scalar string or character vector. For other types, the method displays a message indicating the length of the data in bytes, if known. If length is unknown, then the value displayed is the length of the data if body were sent in a request message.

The show method formats Data when possible. For example, the method puts separators between parts of a multipart message and separately converts each part to a string. If Data is a string or character vector, then the string and show methods return the same value.

Use this method for diagnostics or debugging.


show(body,maxlength) displays the first maxlength characters of Data. If Data is longer than maxlength characters, then the method displays the total length of the data.

str = show(___) returns a string containing the information to be displayed, and can include any of the input arguments in previous syntaxes.

Input Arguments

expand all

Message body, specified as a object.

Number of bytes to convert, specified as an integer.


expand all

Display data about an image received from the Hubble Heritage website.

req =;
uri ='');
r = send(req,uri);
<< 201317 bytes of image/jpeg data >>

Request the MATLAB® webread documentation from

uri ='');
request =;
r = send(request,uri);

Display the first 100 characters of the message body.

<html lang="en">
<title>Read content from RESTful web service - MATLAB webrea

<< 115501 total characters of text/html UTF-8 data >>

Version History

Introduced in R2016b