MATLAB 帮助中心
类: matlab.net.http.Message 命名空间: matlab.net.http
显示或返回消息的格式化版本
show(msg)
show(msg,maxlength)
str = show(___)
show(msg) 在命令行窗口中显示整个消息,包括 Header 和 Body 属性。如果 Body 包含不能转换为字符的二进制数据,此方法将显示指示数据长度(以字节为单位)的消息。
msg
Header
Body
可以使用此语法进行诊断或调试。
show(msg,maxlength) 显示 Body 的前 maxlength 个字符。如果 Body 超过 maxlength 个字符,此方法将显示数据的总长度。
maxlength
示例
str = show(___) 返回一个字符串,其中包含要显示的信息,且可包含上述语法中的任何输入参量。
全部展开
matlab.net.http.Message
消息,指定为 matlab.net.http.Message 对象或由 Message 对象组成的向量。
Message
要转换的字节数,指定为整数。
仅显示来自 mathworks.com 的消息主体中的前 100 个字符。MATLAB 将显示指示消息主体中字符总数的文本。
mathworks.com
request = matlab.net.http.RequestMessage; uri = matlab.net.URI('https://www.mathworks.com'); r = send(request,uri); show(r,100)
HTTP/1.1 200 OK Date: Mon, 02 Oct 2017 12:55:05 GMT Server: Apache/2.2.15 (CentOS) Host-ID: wcxm4 X-Content-Type-Options: nosniff Last-Modified: Sun, 01 Oct 2017 16:57:27 GMT ETag: "f4b6" Accept-Ranges: bytes Cache-Control: max-age=14400 Expires: Mon, 02 Oct 2017 16:55:05 GMT Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 9500 Content-Type: text/html; charset=UTF-8 Connection: close <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-w << 62581 total characters of text/html UTF-8 data >>
在 R2016b 中推出
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处