为RESTful web服务指定参数
WebOptions.
对象创建一个默认的WebOptions.
对象并显示其属性的默认值。
选择= weboptions
UserAgent: 'MATLAB 9.7.0.1112323 (R2019b)' Timeout: 5 Username: " Password: " KeyName: " KeyValue: " ContentType: 'auto' ContentReader: [] MediaType: 'auto' RequestMethod: 'auto' ArrayFormat: 'csv' HeaderFields: [] CertificateFilename: 'default'
设置您的web服务用户名和密码WebOptions.
对象。您可以使用对象作为输入参数韦布雷德
,Websave.
, 要么webwrite
当您的Web服务需要身份验证时。
选择= weboptions ('用户名',“jdoe”,“密码”,“我的密码”);
显示时,密码被遮挡WebOptions.
对象。但是,对象将密码存储为纯文本。您可以从中检索密码WebOptions.Password.
财产。
选项。密码
ans ='mypassword'